Re: Describe command alternatives in postgresql

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: Describe command alternatives in postgresql
Дата
Msg-id ib61m8$qru$1@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на Describe command alternatives in postgresql  (Vaduvoiu Tiberiu <vaduvoiutibi@yahoo.com>)
Список pgsql-novice
On 2010-11-06, Vaduvoiu Tiberiu <vaduvoiutibi@yahoo.com> wrote:
> --0-464382686-1289036230=:84858
> Content-Type: text/plain; charset=us-ascii
>
> Hello,
>
> this is my first post on this list. I'm trying to migrate my application's database from MySql to Postgresql. One of
themain problem I'm facing, is trying to find an alternative for the "Describe" command. In MySql you can call
"DescribeXX" where xx can be the name of the table/view in your database. In Postgresql I can call "select * from
INFORMATION_SCHEMA.COLUMNSwhere table_name = XX". This works, except I also have a lot of views in my database, for
whichDescribe worked ok in mysql. But in Postgresql it seems I can't find a command that would work both on views and
tables.Does anyone know an equivalent function or a workaround for this?  
>

\d relation_name

on the psql command line is shorthand for some long query to get info
about the table

\d+ relation_name

gives more information

\? gives info about other similar commands.

\h gives sql help, but you know that from reading the banner it prints when you start it right?



--
ɹǝpun uʍop ɯoɹɟ sƃuıʇǝǝɹ⅁


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

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: Data Types
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: Function to spell out a number