Thread:

From
"David J. R. Brook"
Date:
I'm trying to use the 'bit' and 'varbit' datatypes in a     table. The demo file 'varbit.demo.sql' runs fine but
when I     try to INSERT data into the table I get a message:
     ERROR: zpbit_in: bit string of size 8 cannot be
written into     bits(1)
     I can add data to the table through the console a la
demo     file though. I can also write one binary digit (i.e.
'B1')     using INSERT but I cannot write longer bit strings -
neither     can I find a way to make the type of the column to be
a     longer bit string. Any suggestions?
     (I get the same problem with the varbit data type)
     David Brook     Asst. Professor, Department of Chemistry and
Biochemistry     University of Detroit Mercy     ph: (313) 993-2495     fax: (313) 993-1144David Brook
Asst. Professor, Department of Chemistry and Biochemistry
University of Detroit Mercy
ph: (313) 993-2495
fax: (313) 993-1144


Re:

From
Tom Lane
Date:
"David J. R. Brook" <brookd@udmercy.edu> writes:
> I'm trying to use the 'bit' and 'varbit' datatypes in a table.

What version are you running?  IIRC, there are types calling themselves
bit and varbit in 7.0, but they're only stubs; the first real support
for bitstrings is in 7.1.
        regards, tom lane