On Friday 27 October 2006 02:25, Sandeep Khandelwal wrote:
> Hi.
>
> I would like to get field's name, datatype of each field, length of each
> field and precision of each field of a PostgreSQL table. Please let me SQL
> query to get this information.
See these two chapters in the postgresql docs:
http://www.postgresql.org/docs/8.1/interactive/catalogs.htmlhttp://www.postgresql.org/docs/8.1/interactive/information-schema.html
Each has advantages over the other.
Also, if you start psql with the flag --echo-hidden, when you do commands like
\dt and \d+, psql will show you the sql it uses to produce that output.
Sean
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера