From: "Marc G. Fournier" on
On Thu, 15 Jul 2010, Peter Eisentraut wrote:

> On tor, 2010-07-15 at 17:35 +0100, Simon Riggs wrote:
>> There should be one command to "display a list of tables" and it needs
>> to be easily guessable for those who have forgotten.
>
> Well, if you put information_schema in the default path, it'd be
>
> SELECT * FROM TABLES;

mre like:

SELECT * FROM TABLES WHERE not a system table or information schema table;

if we want to get *somewhere* close to \d ...


----
Marc G. Fournier Hub.Org Hosting Solutions S.A.
scrappy(a)hub.org http://www.hub.org

Yahoo:yscrappy Skype: hub.org ICQ:7615664 MSN:scrappy(a)hub.org

--
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: Andrew Dunstan on


Joshua D. Drake wrote:
> On Thu, 2010-07-15 at 18:48 +0000, Greg Sabino Mullane wrote:
>
>
>> P.S. What's with the uppercase mania in this thread? Can we
>> please get back to saying "select * from tables"
>> and "show tables"? :)
>>
>
> The standard specifies that it it should be uppercase.
>
> :P
>
>
>

You're thinking about the unquoted identifiers. That's quite different
from what is required of keywords.

cheers

andrew

--
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: "Andreas 'ads' Scherbaum" on
On Thu, 15 Jul 2010 22:01:34 +0300 Peter Eisentraut wrote:

> On tor, 2010-07-15 at 19:21 +0200, Andreas 'ads' Scherbaum wrote:
> > Is there a way to query all databases from information_schema?
>
> No.

This got rejected before, because of "not in the standard".
In this case: no way to answer "SHOW DATABASES" by just using
information_schema. At least this question requires using the system
tables.


Bye

--
Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project

--
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: "Greg Sabino Mullane" on

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> I was assuming the process would be something like:
> 1. Move existing \d queries into functions*
> 2. Convert psql to use those

Oops! There's goes your ability to handle older versions
of Postgres from the existing psql[1]. Cue angry mobs
of DBAs with pitchforks. And no, a contrib like add-on
won't go over well either.

[1] (unless we keep both types of access around for many many
years, until we can be sure that any database queries will
have the new utility functions)

- --
Greg Sabino Mullane greg(a)turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201007151540
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkw/ZOIACgkQvJuQZxSWSshQ8gCfacG3r9N3rIn4Vbb/8tz0JK7S
uCcAn037OYy9E5uiG84qBjjxzNox27+D
=6sHa
-----END PGP SIGNATURE-----



--
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: Heikki Linnakangas on
On 15/07/10 19:06, Aaron W. Swenson wrote:
> 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 . . . .

+1. That doesn't force us to implement a whole new set of commands and
syntax to describe stuff in the backend, duplicating the \d commands,
but is polite to the users, and immediately guides them to the right
commands.

You could even do that in the backend for a few simple commands like
SHOW TABLES:

ERROR: syntax error at "SHOW TABLES"
HINT: To list tables in the database, SELECT * FROM pg_tables or use the
\d psql command.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.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

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Prev: [HACKERS] SHOW TABLES
Next: reducing NUMERIC size for 9.1