Re: [HACKERS] psql \d option list overloaded

2004-03-30 Thread Bruce Momjian
I have added this psql backslash discussion to TODO.detail. --- Peter Eisentraut wrote: > Tom Lane wrote: > > But this interacts with point 3 (psql breaks on every new backend > > version). It's not desirable to have every

Re: [HACKERS] psql \d option list overloaded

2004-01-12 Thread Peter Eisentraut
Tom Lane wrote: > But this interacts with point 3 (psql breaks on every new backend > version). It's not desirable to have every GUI and large custom > program implementing its own set of metadata inquiry commands: they > all have to go through the same update pain as psql. Perhaps if > people st

Re: [HACKERS] psql \d option list overloaded

2004-01-11 Thread Robert Treat
On Saturday 10 January 2004 19:16, Jon Jensen wrote: > On Sat, 10 Jan 2004, Tom Lane wrote: > > ISTM there are three fundamental problems with \d and friends: > > > > 1. Some people have a hard time remembering the commands. > > 2. Some people aren't using psql. > > 3. psql keeps breaki

Re: [HACKERS] psql \d option list overloaded

2004-01-11 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> 2. Some people aren't using psql. > I don't see why this is an issue. People not using psql are either > using a GUI, which presumably supports plenty of "show" and "describe" > functionality, or they're writing their own program

Re: [HACKERS] psql \d option list overloaded

2004-01-11 Thread Dennis Bjorklund
On Sun, 11 Jan 2004, Peter Eisentraut wrote: > Another problem with pushing psql's queries into the backend is that > much of the output that psql makes is not a single table. Sometimes > there is more than one table, or the information is in the table > footers. Yes, pushing the \xx commands

Re: [HACKERS] psql \d option list overloaded

2004-01-10 Thread Peter Eisentraut
Dennis Björklund wrote: > > What is wrong with > > > > SELECT * FROM information_schema.tables; > > The result is very hard to read since it's so much of it (try column > instead of tables). The \xx commands do some nice formatting you > don't get from the above. This is an interesting point to re

Re: [HACKERS] psql \d option list overloaded

2004-01-10 Thread Peter Eisentraut
Tom Lane wrote: > 2. Some people aren't using psql. I don't see why this is an issue. People not using psql are either using a GUI, which presumably supports plenty of "show" and "describe" functionality, or they're writing their own program, in which case it doesn't really matter how sh

Re: [HACKERS] psql \d option list overloaded

2004-01-10 Thread Jon Jensen
On Sat, 10 Jan 2004, Tom Lane wrote: > ISTM there are three fundamental problems with \d and friends: > > 1. Some people have a hard time remembering the commands. > 2. Some people aren't using psql. > 3. psql keeps breaking across backend versions because the > needed

Re: [HACKERS] psql \d option list overloaded

2004-01-10 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > So for example: > \describe table foo => \dt foo > \describe index foo => \di foo > \describe aggregate foo => \da foo > \describe operator foo => \do foo It doesn't seem to me that this buys much except verboseness, though. ISTM there are three fundament

Re: [HACKERS] psql \d option list overloaded

2004-01-10 Thread Greg Stark
Dennis Björklund <[EMAIL PROTECTED]> writes: > I would rather have long commands so one can write > > \describe_table foo I would think it would be better to keep everything under a single command and have a 1-1 correspondence to \d. Ie, just add a long form syntax following the existing \d. \d

Re: [HACKERS] psql \d option list overloaded

2004-01-10 Thread Dennis Björklund
On Sat, 10 Jan 2004, Peter Eisentraut wrote: > > to remember way of showing the various entities in psql (at the very > > least) would be of great advantage. It's something that MySQL gets > > right. As it turns out, we already have "SHOW" in psql and it's used > > for something else. > > What

Re: [HACKERS] psql \d option list overloaded

2004-01-10 Thread Peter Eisentraut
Kevin Brown wrote: > Every database engine is different, but in the case of PG it makes > sense to adopt the best methods we can find. A consistent and easy > to remember way of showing the various entities in psql (at the very > least) would be of great advantage. It's something that MySQL gets

Re: [HACKERS] psql \d option list overloaded

2004-01-10 Thread Kevin Brown
Alex J. Avriette wrote: > On Sun, Jan 04, 2004 at 07:59:02PM -0600, D. Dante Lorenso wrote: > > > Anything other than simple, short commands is a waste, IMHO. I can easily > > remember SHOW DATABASES and SHOW TABLES and DESC , because they > > reflect > > my intensions directly and 'make sense'.

Re: [HACKERS] psql \d option list overloaded

2004-01-09 Thread Andrew Dunstan
Thomas Swan wrote: The \d* commands work from psql but not from anywhere else.Try getting the information from a PHP script by sending a "\dS" query. It doesn't work. If the same queries were stored in the backend and referenced by psql and also could be referenced by other scripts, this

Re: [HACKERS] psql \d option list overloaded

2004-01-09 Thread Tommi Maekitalo
Hi, > > 2) (using information schema ... little better) > > SELECT table_name FROM information_schema.tables WHERE table_schema > = 'public'; > > or ... > ... I just looked at the information_schema. It is a very nice feature, but difficult to use in psql. I just wanted to see, what I can f

Re: [HACKERS] psql \d option list overloaded

2004-01-09 Thread Thomas Swan
Bruce Momjian wrote: >Alex J. Avriette wrote: > > >>On Sun, Jan 04, 2004 at 07:59:02PM -0600, D. Dante Lorenso wrote: >> >> >> >>>Anything other than simple, short commands is a waste, IMHO. I can easily >>>remember SHOW DATABASES and SHOW TABLES and DESC , because they >>>reflect >>>my in

Re: [HACKERS] psql \d option list overloaded

2004-01-08 Thread Rod Taylor
> Anything other than simple, short commands is a waste, IMHO. I can easily > remember SHOW DATABASES and SHOW TABLES and DESC , because they > reflect > my intensions directly and 'make sense'. Can you remember how to get a list of indexes on a particular table? How about a specific indexes bui

Re: [HACKERS] psql \d option list overloaded

2004-01-08 Thread D. Dante Lorenso
Alex J. Avriette wrote: 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

Re: [HACKERS] psql \d option list overloaded

2004-01-08 Thread William ZHANG
I think moving the \d and simliar features in psql to SQL is a good idea. That will make the features available in any client library. As for the syntax, maybe a investigation is needed. ---(end of broadcast)--- TIP 6: Have you searched our list ar

Re: [HACKERS] psql \d option list overloaded

2004-01-06 Thread Tommi Maekitalo
Am Sonntag, 4. Januar 2004 20:13 schrieb Alex J. Avriette: > 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 ... > > /functions > /databases > ... Long options sounds really good. It is like GNU-tools. A s

Re: [HACKERS] psql \d option list overloaded

2004-01-05 Thread Bruce Momjian
Alex J. Avriette wrote: > On Sun, Jan 04, 2004 at 07:59:02PM -0600, D. Dante Lorenso wrote: > > > Anything other than simple, short commands is a waste, IMHO. I can easily > > remember SHOW DATABASES and SHOW TABLES and DESC , because they > > reflect > > my intensions directly and 'make sense'.

Re: [HACKERS] psql \d option list overloaded

2004-01-05 Thread Alex J. Avriette
On Sun, Jan 04, 2004 at 07:59:02PM -0600, D. Dante Lorenso wrote: > Anything other than simple, short commands is a waste, IMHO. I can easily > remember SHOW DATABASES and SHOW TABLES and DESC , because they > reflect > my intensions directly and 'make sense'. What makes sense to me in csh does

Re: [HACKERS] psql \d option list overloaded

2004-01-04 Thread Alex J. Avriette
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

Re: [HACKERS] psql \d option list overloaded

2004-01-04 Thread Peter Eisentraut
Bruce Momjian wrote: > I am starting to agree that our \d* handling is just too overloaded. > Look at the option list from \?: > Can anyone remember all those? Yes. > I like the idea of adding a new syntax to show that information using > simple SQL command syntax, and putting it in the backend

Re: [HACKERS] psql \d option list overloaded

2004-01-04 Thread Mark Kirkwood
Couldn't agree more - syntax like SHOW TABLES; is inituitive and somehow "right" - [chuckles] - Mysql does not have *everything* wrong! regards Mark Bruce Momjian wrote: I like the idea of adding a new syntax to show that information using simple SQL command syntax, and putting it in the bac

[HACKERS] psql \d option list overloaded

2004-01-03 Thread Bruce Momjian
D. Dante Lorenso wrote: > > When I started with PostgreSQL and MySQL, MySQL was far easier > > to use > > I started with MySQL and it WAS easier to use. It was easier because > the manual essentially reads: > >-- we didn't implement anything complicated that's why >-- we are fast. > > T