Re: SHOW TABLES

Поиск
Список
Период
Сортировка
От Aaron W. Swenson
Тема Re: SHOW TABLES
Дата
Msg-id 201007151206.10172.aaron.w.swenson@gmail.com
обсуждение исходный текст
Ответ на Re: SHOW TABLES  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: SHOW TABLES  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
As a common user -- probably a bit more than that now -- I'd have to say my 
reaction to '\d' instead of 'SHOW DATABASES;' was more of a "meh" moment for 
me. Furthermore, '\d' is much quick to type than 'SHOW DATABASES;', and much 
less likely to suffer typos.

As for '\d' not being memorable: It sure as heck is! I think the real problem 
here is that there's a little effort required in learning a new set of 
commands when switching from a competing database.

'SHOW . . . .' cannot be implemented in psql alone. It would have to supported 
in the backend. So that other drivers are able to understand it as well. If it 
implemented in psql only, we will be bombarded with "I don't understand this! 
'SHOW . . . .' works when I do it at the command line, but not in my script! 
WTF?'

The best solution is to offer a hint to the user in psql when they submit 
'SHOW . . . .' with a response like: SHOW . . . . is not a valid command. 
Perhaps you mean \d . . . .

Sincerely,   Aaron

On Thursday 15 July 2010 11:48:39 Joshua D. Drake wrote:
> On Thu, 2010-07-15 at 16:20 +0100, Simon Riggs wrote:
> > On Thu, 2010-07-15 at 11:05 -0400, Tom Lane wrote:
> > > Simon Riggs <simon@2ndQuadrant.com> writes:
> > > > The biggest turn off that most people experience when using
> > > > PostgreSQL is that psql does not support memorable commands.
> > > > 
> > > > I would like to implement the following commands as SQL, allowing
> > > > them to be used from any interface.
> > > > 
> > > > SHOW TABLES
> > > > SHOW COLUMNS
> > > > SHOW DATABASES
> > > 
> > > This has been discussed before, and rejected before.  Please see
> > > archives.
> > 
> > Many years ago. I think it's worth revisiting now in light of the number
> > of people now joining the PostgreSQL community and the greater
> > prevalence other ways of doing it. The world has changed, we have not.
> > 
> > I'm not proposing any change in function, just a simpler syntax to allow
> > the above information to be available, for newbies.
> > 
> > Just for the record, I've never ever met anyone that said "Oh, this \d
> > syntax makes so much sense. I'm a real convert to Postgres now you've
> > shown me this". The reaction is always the opposite one; always
> > negative. Which detracts from our efforts elsewhere.
> 
> I have to agree with Simon here. \d is ridiculous for the common user.
> 
> SHOW TABLES, SHOW COLUMNS makes a lot of sense. Just has something like
> DESCRIBE TABLE foo makes a lot more sense than \d.
> 
> 
> Sincerely,
> 
> Joshua D. Drake


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: SHOW TABLES
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: SHOW TABLES