From: | "Dann Corbit" <DCorbit(at)connx(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Gregory Stark" <stark(at)enterprisedb(dot)com>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, <pgsql-hackers(at)postgresql(dot)org>, "Larry McGhaw" <lmcghaw(at)connx(dot)com> |
Subject: | Re: Selecting a constant question |
Date: | 2007-06-11 22:36:47 |
Message-ID: | D425483C2C5C9F49B5B7A41F8944154701000717@postal.corporate.connx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Monday, June 11, 2007 3:35 PM
> To: Dann Corbit
> Cc: Gregory Stark; Martijn van Oosterhout;
pgsql-hackers(at)postgresql(dot)org;
> Larry McGhaw
> Subject: Re: [HACKERS] Selecting a constant question
>
> "Dann Corbit" <DCorbit(at)connx(dot)com> writes:
> > Giving me the information about the data type will be enough. As an
> > example, in this case we have varchar data. If the server should be
so
> > kind as to report varchar(1) for '1' or varchar(3) for '123' then I
> > would not have any difficulty binding the data to a grid.
>
> This seems merest fantasy. Reflect on multibyte character sets for a
> bit --- even if it's known that the column is varchar(3) there is no
> guarantee that the value will fit in 3 bytes.
If the server bound the data as UNICODE, then it will tell me
UNICODE(3). I know how big this will be.
In the worst case scenario it will fit in 3*4 = 12 bytes.
If the server is built without UNICODE enabled, then it will definitely
fit in 3 bytes.
From | Date | Subject | |
---|---|---|---|
Next Message | Dann Corbit | 2007-06-11 22:39:49 | Re: Selecting a constant question |
Previous Message | Tom Lane | 2007-06-11 22:34:46 | Re: Selecting a constant question |