From: Tom Lane on
Dimitri Fontaine <dfontaine(a)hi-media.com> writes:
> I'll give my vote to Peter's idea that show tables; should better act as
> if you typed \d.

We have previously considered and rejected this type of approach, for
example in the pgsql-bugs discussion I referenced upthread.

> I don't see what the gain is to refuse being nice to MySQL newcomers
> when someone actually does the work.

Nobody has actually done such work, nor offered to. If it did show up
it would be a large and ugly patch that would have a good chance of
being rejected. The proposed patch to just provide a helpful message
is only a dozen or two lines, which is about the right amount of effort
to expend in this direction IMHO.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Dimitri Fontaine on
Tom Lane <tgl(a)sss.pgh.pa.us> writes:
> The proposed patch to just provide a helpful message
> is only a dozen or two lines, which is about the right amount of effort
> to expend in this direction IMHO.

For the record, agreed on the commands for which we have no obvious
equivalent :)

Regards,
--
Dimitri Fontaine
PostgreSQL DBA, Architecte

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Florian Weimer on
* David Christensen:

> Currently, a session will look like the following:
>
> machack:machack:5485=# show tables;
> See:
> \d
> or \? for general help with psql commands
> machack:machack:5485=#
>
> Said formatting looks like it could use some improvement, open to
> suggestions, but something on a single line seems more useful.

You should at least make clear that this is an error message due to an
unsupported command. The output above looks broken. Something like
this should be okay, I think:

ERROR: unrecognized configuration parameter "tables"
NOTICE: use \d to list tables, or \? for general help with psql commands

ERROR: unrecognized configuration parameter "databases"
NOTICE: use \l to list databases, or \? for general help with psql commands

(I hope that this is less controversial, too.)

--
Florian Weimer <fweimer(a)bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: David Christensen on

On Jan 21, 2010, at 11:48 AM, Florian Weimer wrote:

> * David Christensen:
>
>> Currently, a session will look like the following:
>>
>> machack:machack:5485=# show tables;
>> See:
>> \d
>> or \? for general help with psql commands
>> machack:machack:5485=#
>>
>> Said formatting looks like it could use some improvement, open to
>> suggestions, but something on a single line seems more useful.
>
> You should at least make clear that this is an error message due to an
> unsupported command. The output above looks broken. Something like
> this should be okay, I think:
>
> ERROR: unrecognized configuration parameter "tables"
> NOTICE: use \d to list tables, or \? for general help with psql
> commands
>
> ERROR: unrecognized configuration parameter "databases"
> NOTICE: use \l to list databases, or \? for general help with psql
> commands


That's a very good point as far as the visibility is concerned.
Should the error messages between the SHOW cases and the others be
consistent ("ERROR: unsupported command" or similar)? It's worth
noting that this is only in the psql client, but we could simulate the
ereport output from the server.

Regards,

David
--
David Christensen
End Point Corporation
david(a)endpoint.com





--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Pavel Stehule on
2010/1/21 David Christensen <david(a)endpoint.com>:
>
> On Jan 21, 2010, at 11:48 AM, Florian Weimer wrote:
>
>> * David Christensen:
>>
>>> Currently, a session will look like the following:
>>>
>>>  machack:machack:5485=# show tables;
>>>  See:
>>>        \d
>>>        or \? for general help with psql commands
>>>  machack:machack:5485=#
>>>
>>> Said formatting looks like it could use some improvement, open to
>>> suggestions, but something on a single line seems more useful.
>>
>> You should at least make clear that this is an error message due to an
>> unsupported command.  The output above looks broken.  Something like
>> this should be okay, I think:
>>
>> ERROR:  unrecognized configuration parameter "tables"
>> NOTICE: use \d to list tables, or \? for general help with psql commands
>>
>> ERROR:  unrecognized configuration parameter "databases"
>> NOTICE: use \l to list databases, or \? for general help with psql
>> commands
>
>
> That's a very good point as far as the visibility is concerned.  Should the
> error messages between the SHOW cases and the others be consistent ("ERROR:
> unsupported command" or similar)?  It's worth noting that this is only in
> the psql client, but we could simulate the ereport output from the server.

I don't think so it is the best idea. I like different message types,
because I able to identify place of error. If it is server or client
error.

Pavel

>
> Regards,
>
> David
> --
> David Christensen
> End Point Corporation
> david(a)endpoint.com
>
>
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers