Re: system catalog and varchar datatype

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: system catalog and varchar datatype
Дата
Msg-id 1090272376.25749.139.camel@linda
обсуждение исходный текст
Ответ на system catalog and varchar datatype  ("sandra ruiz" <mileruiz@hotmail.com>)
Список pgsql-general
On Mon, 2004-07-19 at 21:58, sandra ruiz wrote:
> hi, I need to find out the length of a varchar attribute ..
>
> for example,if a I have an atribute "description varchar(256)"  I would
> expect to see this "256" in the pg_attribute table.
>
> there's is an "attlen" In the pg_attribute but this doesn't give any
> information

SELECT pg_catalog.format_type(a.atttypid, a.atttypmod)
  FROM pg_attribute AS a;

would return "character varying(10)" or similar.

--
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
                 ========================================
     "Blessed is the man that trusteth in the LORD, and
      whose hope the LORD is."            Jeremiah 17:7


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

Предыдущее
От: "sandra ruiz"
Дата:
Сообщение: system catalog and varchar datatype
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: system catalog and varchar datatype