| From: | Hannu Krosing <hannu(at)skype(dot)net> |
|---|---|
| To: | Dann Corbit <DCorbit(at)connx(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Selecting a constant question |
| Date: | 2007-06-12 03:41:55 |
| Message-ID: | 1181619715.6242.3.camel@hannu-laptop |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Ühel kenal päeval, E, 2007-06-11 kell 13:38, kirjutas Dann Corbit:
> > -----Original Message-----
> > From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> > Sent: Monday, June 11, 2007 1:32 PM
> > To: Dann Corbit
> > Cc: Gregory Stark; pgsql-hackers(at)postgresql(dot)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 ?
----------
Hannu
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Larry McGhaw | 2007-06-12 05:11:38 | Re: Selecting a constant question |
| Previous Message | FAST PostgreSQL | 2007-06-12 03:10:23 | Re: COPYable logs status |