Re: Selecting a constant question

Поиск
Список
Период
Сортировка
От Dann Corbit
Тема Re: Selecting a constant question
Дата
Msg-id D425483C2C5C9F49B5B7A41F8944154701000725@postal.corporate.connx.com
обсуждение исходный текст
Ответ на Re: Selecting a constant question  (Hannu Krosing <hannu@skype.net>)
Ответы Re: Selecting a constant question  ("Florian G. Pflug" <fgp@phlo.org>)
Список pgsql-hackers
> -----Original Message-----
> From: Hannu Krosing [mailto:hannu@skype.net]
> Sent: Monday, June 11, 2007 8:42 PM
> To: Dann Corbit
> Cc: Tom Lane; Gregory Stark; pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] Selecting a constant question
>
> Ühel kenal päeval, E, 2007-06-11 kell 13:38, kirjutas Dann Corbit:
> > > -----Original Message-----
> > > From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> > > Sent: Monday, June 11, 2007 1:32 PM
> > > To: Dann Corbit
> > > Cc: Gregory Stark; pgsql-hackers@postgresql.org
> > > Subject: Re: [HACKERS] Selecting a constant question
> ...
> > > You should be treating typlen as signed not unsigned, and not assuming
> > a
> > > fixed width for any negative value.
> > >
> > > Since the width refers to the server internal representation, and not
> > to
> > > what comes down the wire, I find it pretty strange for an application
> > to
> > > be using typlen for anything at all actually.
> >
> > Thanks for the response.
> >
> > Since libpq function PQfsize returns -2 for all constant character
> > strings in SQL statements ... What is the proper procedure to determine
> > the length of a constant character column after query execution but
> > before fetching the first row of data?
>
> Why not just get the first row and determine the width from it before
> you actually use any of tha data ?

What if the second row is 1000x longer?


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Selecting a constant question
Следующее
От: "Dann Corbit"
Дата:
Сообщение: Re: Selecting a constant question