Re: About primary keys -- made some progress

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: About primary keys -- made some progress
Дата
Msg-id 24415.1061037371@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: About primary keys -- made some progress  (Tim Andersen <timander37@yahoo.com>)
Список pgsql-sql
Tim Andersen <timander37@yahoo.com> writes:
> I still have a question about how to get the
> information about length and precision of a column
> from pg_attributes.atttypmod.  are there built-in
> functions for PostgreSQL to extract this information?

Best is to rely on the format_type() function.  Also, have you thought
about using pg_get_indexdef() in place of all that hacking about in
pg_index?

http://www.postgresql.org/docs/7.3/static/functions-misc.html

In general, your code is less likely to break if you can use the
"catalog information functions" rather than poking around in the
catalogs directly.
        regards, tom lane


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

Предыдущее
От: Bengali
Дата:
Сообщение: [Newbie] migrating a stored procedure from MSSQL to postgresql
Следующее
От: Ian Barwick
Дата:
Сообщение: Re: Optional join