Re: [HACKERS] Re: [INTERFACES] retrieving varchar size

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
Дата
Msg-id 199804232117.RAA11218@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [INTERFACES] retrieving varchar size  (Hannu Krosing <hannu@trust.ee>)
Список pgsql-interfaces
> is this on client side or server side?
>
> Last time I checked (it was in 6.2 protocol) it was not sent to client.
>
> What I need is the defined max length of varchar (or char), not just
> actual length of each field of that type. This is used by Borlands BDE,
> and if this changes, depending on the where clause, it breaks BDE.

Can't you do:

    select atttypmod from pg_attribute
    where attrelid = 10003 and attname = 'col1';

That will give the length + 4 bytes.


--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
Следующее
От: "Michael Moss"
Дата:
Сообщение: Re: [INTERFACES] Can't connect with ODBC