Hi gang,

Is there a datatype that means "one byte"? I'm importing a database from 
SQL Server, and some of the rows there are of this type. When I convert 
them to int2, I have discrepancies with the program that uses the 
database (OLE DB uses binary mode transfers, so the size of the variable 
is important beyond it's legal range).

             Shachar

-- 
Shachar Shemesh
Lingnu Open Systems Consulting
http://www.lingnu.com/


Mon, 08 Mar 2004 16:36:41 +0200
Shachar Shemesh <psql@shemesh.biz>
one byte data type
Shachar Shemesh <psql@shemesh.biz> writes:
> Is there a datatype that means "one byte"?

You might be able to use the "char" type (note the quotes).  I am not
sure how well it will cope with storing zeroes (nulls) though.

			regards, tom lane

Mon, 08 Mar 2004 10:58:14 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: one byte data type 
Tom Lane wrote:

>Shachar Shemesh <psql@shemesh.biz> writes:
>  
>
>>Is there a datatype that means "one byte"?
>>    
>>
>
>You might be able to use the "char" type (note the quotes).  I am not
>sure how well it will cope with storing zeroes (nulls) though.
>
>			regards, tom lane
>  
>
Hmm, this will also screw up textual queries. Not important for this 
particular case, but not a good general solution. What are the chances 
of adding such a type for 7.4.2?

          Shachar
P.S.
Notice how this message arrives directly as well, despite spam filters.

-- 
Shachar Shemesh
Lingnu Open Systems Consulting
http://www.lingnu.com/


Mon, 08 Mar 2004 18:13:00 +0200
Shachar Shemesh <psql@shemesh.biz>
Re: one byte data type