Re: psql \d option list overloaded - Mailing list pgsql-hackers
From | Alex J. Avriette |
---|---|
Subject | Re: psql \d option list overloaded |
Date | |
Msg-id | 20040104191322.GD8524@posixnap.net Whole thread Raw |
In response to | psql \d option list overloaded (Bruce Momjian <pgman@candle.pha.pa.us>) |
Responses |
Re: psql \d option list overloaded
Re: psql \d option list overloaded |
List | pgsql-hackers |
On Sat, Jan 03, 2004 at 08:25:21PM -0500, Bruce Momjian wrote: > > I finally figure it out, I just end up forgetting again later. I still > > have no clue how I'd find the same data without using psql. In MySQL > > I can run those queries from PHP, PERL...etc. I know you can find that > > data in system tables in PostgreSQL, but I don't wanna muck around with > > all that. I just wanna do something as simple as MySQL. > > [ Moved to hackers.] > > I am starting to agree that our \d* handling is just too overloaded. > Look at the option list from \?: > I like the idea of adding a new syntax to show that information using > simple SQL command syntax, and putting it in the backend so all > applications can access it. I know we have information schema, and > maybe that can be used to make this simpler. Bruce, while I agree with you about \d (and all its children), as well as the querying we talked about on irc, I disagree with the notion of a "SHOW DATABASES" query. This is one of the things that irritates me about mysql is the pseudo-sql that everyone has come to accept (through learning sql on mysql) as "sql". Things such as the '#' comments, and the various SHOW DATABASES, I feel, detract from the "look and feel" of the database. That look and feel is one of the reasons I am so loyal to postgres (and indeed why some people are so loyal to mysql). It doesn't make sense to create pseudo-sql, when all you're abstracting is function-macros. I think the backslash syntax is fine. If you really wanted to change it, you might consider a different syntax for it. Many of us are familiar with slash/bang/colon/backslash commands in interfacing with the programs we use regularly (vi, shells, irc clients). Why not a /functions as a long syntax for \df? Would there be a direct problem using the forward slash as a command indicator? This way you could give people like the original poster something they were looking for, eg: /functions /databases and what I was looking for: /functions timestamp It also allows us a lot more freedom in changing the syntax, as the expression of the commands is english (or, pick your language). I seem to recall Neil mentioning to me that was a problem with internationalization, but that's over my head. I don't have any particular allegiance to the forward slash over anything else. My chief concern is that what we're abstracting here are macros, and as such, they should not be treated as sql. Because they aren't sql. If you want to find out how to show the databases in sql, use psql -E. Alex -- alex@posixnap.net Alex J. Avriette, Solaris Systems Masseur "I ... remain against the death penalty because I feel that eternal boredom with no hope of parole is a much worse punishmentthan just ending it all mercifully with that quiet needle." - Rachel Mills, NC Libertarian Gubernatorial Candidate
pgsql-hackers by date: