Re: protocol change in 7.4

Поиск
Список
Период
Сортировка
От snpe
Тема Re: protocol change in 7.4
Дата
Msg-id 200211072249.11238.snpe@snpe.co.yu
обсуждение исходный текст
Ответ на Re: protocol change in 7.4  (korry <korry@starband.net>)
Ответы Re: protocol change in 7.4  (Hannu Krosing <hannu@tm.ee>)
Re: protocol change in 7.4  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
On Thursday 07 November 2002 09:50 pm, korry wrote:
> > > b)  Send a decoded version of atttypmod - specifically, decode the
> > > precision and scale for numeric types.
> >
> >I want decode type,length,precision and scale
>
> Type is returned by PQftype(), length is returned by PQfsize().  Precision
> and scale are encoded in the return value from PQfmod() and you have to
> have a magic decoder ring to understand them. (Magic decoder rings are
> available, you just have to read the source code :-)
>
> PQftype() is not easy to use because it returns an OID instead of a name
> (or a standardized symbol), but I can't think of anything better to return
> to the client.   Of course if you really want to make use of PQftype(), you
> can preload a client-side cache of type definitions.  I seem to remember
> seeing a patch a while back that would build the cache and decode precision
> and scale too.
>
>   PQfsize() is entertaining, but not often what you really want (you really
> want the width of the widest value in the column after conversion to some
> string format - it seems reasonable to let the client applicatin worry
> about that, although maybe that would be a useful client-side libpq
> function).
>
>
I want this in any catalog view

regards
Haris Peco


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

Предыдущее
От: korry
Дата:
Сообщение: Re: protocol change in 7.4
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Outstanding patches