This is a discussion on psql backslash consistency within the Pgsql Patches forums, part of the PostgreSQL category; --> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Attached is my "backslash consistency" patch which basically makes all the backslash commands ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Attached is my "backslash consistency" patch which basically makes all the backslash commands behave as \dt does: \d* shows non-system objects, and \d*S shows system objects. See the archives for more discussion on this. I wrote this patch some time ago, and have been meaning to work on enhancing the tab-completion stuff more. However, I'm going to leave it as it is for now[1], and I've updated my patch to the recent cvs. This was done hastily, so it definitely needs a looking over. [1] I'd like to eventually fix psql so that \di [tab] only lists schemas that actually contain possible indexes (or indexes), rather than the current behavior which is to just list all schemas. - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200505261242 http://biglumber.com/x/web?pk=2529DF...9B906714964AC8 -----BEGIN PGP SIGNATURE----- iD8DBQFClfyjvJuQZxSWSsgRAv4aAJ48KPwfzYGpU80KcjS9/obMqKMK0wCgx+M0 hCAJLpFXpj72anOnb+2E0yg= =ezLT -----END PGP SIGNATURE----- ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings |
| |||
| Greg Sabino Mullane <greg@turnstep.com> writes: > Attached is my "backslash consistency" patch which basically makes all > the backslash commands behave as \dt does: \d* shows non-system objects, > and \d*S shows system objects. Could we have a way to turn this off? At least for functions and operators? For my usage, at least, this will be a serious step backwards in usefulness. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org |
| |||
| Tom Lane wrote: > Greg Sabino Mullane <greg@turnstep.com> writes: > > Attached is my "backslash consistency" patch which basically makes > > all the backslash commands behave as \dt does: \d* shows non-system > > objects, and \d*S shows system objects. > > Could we have a way to turn this off? At least for functions and > operators? For my usage, at least, this will be a serious step > backwards in usefulness. I see hardly any use case for showing only user-defined functions or types by default. I think consistency is not necessarily desirable here. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) |
| |||
| On Fri, 2005-05-27 at 03:45, Peter Eisentraut wrote: > Tom Lane wrote: > > Greg Sabino Mullane <greg@turnstep.com> writes: > > > Attached is my "backslash consistency" patch which basically makes > > > all the backslash commands behave as \dt does: \d* shows non-system > > > objects, and \d*S shows system objects. > > > > Could we have a way to turn this off? At least for functions and > > operators? For my usage, at least, this will be a serious step > > backwards in usefulness. Do you have an implementation in mind? I'm having trouble coming up with a way to do it cleanly. > > I see hardly any use case for showing only user-defined functions or > types by default. I think consistency is not necessarily desirable > here. > See the archives for previous discussion and/or use cases. Robert Treat -- Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| |||
| Robert Treat <xzilla@users.sourceforge.net> writes: > Do you have an implementation in mind? I'm having trouble coming up with > a way to do it cleanly. A psql \set variable to choose the behavior seems like a reasonable compromise. Perhaps it could list the \d commands that should include system objects by default --- that would give considerable customization flexibility. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster |
| |||
| On Fri, May 27, 2005 at 01:58:05PM -0400, Robert Treat wrote: > On Fri, 2005-05-27 at 03:45, Peter Eisentraut wrote: > > Tom Lane wrote: > > > Greg Sabino Mullane <greg@turnstep.com> writes: > > > > Attached is my "backslash consistency" patch which basically makes > > > > all the backslash commands behave as \dt does: \d* shows non-system > > > > objects, and \d*S shows system objects. > > > > > > Could we have a way to turn this off? At least for functions and > > > operators? For my usage, at least, this will be a serious step > > > backwards in usefulness. > > Do you have an implementation in mind? I'm having trouble coming up with > a way to do it cleanly. How about a psql config option? It should default to show only non-system objects, as that is the most generally useful behavior. -- Alvaro Herrera (<alvherre[a]surnet.cl>) A male gynecologist is like an auto mechanic who never owned a car. (Carrie Snow) ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org |
| |||
| Robert Treat wrote: > > I see hardly any use case for showing only user-defined functions > > or types by default. I think consistency is not necessarily > > desirable here. > > See the archives for previous discussion and/or use cases. I didn't find any. Nevertheless, while there are undoubtedly some uses for everything, making this the default behavior does not seem acceptable. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster |
| |||
| Alvaro Herrera <alvherre@surnet.cl> writes: > How about a psql config option? It should default to show only > non-system objects, as that is the most generally useful behavior. There seems to be a distinct lack of unanimity about that judgment ;-) regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster |
| |||
| Peter Eisentraut wrote: > Robert Treat wrote: > > > I see hardly any use case for showing only user-defined functions > > > or types by default. I think consistency is not necessarily > > > desirable here. > > > > See the archives for previous discussion and/or use cases. > > I didn't find any. Nevertheless, while there are undoubtedly some uses > for everything, making this the default behavior does not seem > acceptable. I think the logical issue is that a database with no user tables is useless/empty, so showing only user tables makes sense, while a database with no user functions is still useful, and in fact I would think most databases have no user functions. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org |
| ||||
| On Friday 27 May 2005 15:09, Peter Eisentraut wrote: > Robert Treat wrote: > > > I see hardly any use case for showing only user-defined functions > > > or types by default. I think consistency is not necessarily > > > desirable here. > > > > See the archives for previous discussion and/or use cases. > > I didn't find any. Nevertheless, while there are undoubtedly some uses > for everything, making this the default behavior does not seem > acceptable. ISTM it is more acceptable than you're willing to admit. http://archives.postgresql.org/pgsql...4/msg00009.php http://archives.postgresql.org/pgsql...4/msg00102.php http://archives.postgresql.org/pgsql...9/msg00199.php -- Robert Treat Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend |