Re: Switching from MySQL -- Missing DESCRIBE table, SHOW
| От | Oliver Elphick |
|---|---|
| Тема | Re: Switching from MySQL -- Missing DESCRIBE table, SHOW |
| Дата | |
| Msg-id | 1129504202.6816.20.camel@linda.lfix.co.uk обсуждение исходный текст |
| Ответ на | Switching from MySQL -- Missing DESCRIBE table, SHOW TABLES (Gan Uesli Starling <alias@starling.us>) |
| Список | pgsql-novice |
On Sun, 2005-10-16 at 17:17 -0400, Gan Uesli Starling wrote:
> But alas, two of the most useful commands appear to be missing:
>
> SHOW TABLES
> DESCRIBE table
...
> I can't believe there is no way for PostgreSQL to tell me what the
> current DB's table structure is via simple SQL queries executed remotely.
You can use the INFORMATION_SCHEMA (which is standard SQL), but in psql
the simplest way is:
\d+ Show all tables, with descriptions
\d+ table Show the definition of the named table (or view), with
column descriptions
\? Describe briefly all the \ commands in psql
The capabilities of psql are fully described in the manual and in psql's
man page.
--
Oliver Elphick olly@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
Do you want to know God? http://www.lfix.co.uk/knowing_god.html
В списке pgsql-novice по дате отправления: