Thread: bug: Bit String Types

bug: Bit String Types

From
"Pfuetz, Michael"
Date:
<p><font face="Arial" size="2">Hello,</font><font face="Arial"> </font><p><font face="Arial" size="2">i think there is
bugsin pgadmin:</font><font face="Arial"><br /></font><font face="Courier New" size="2">CREATE TABLE
test_bit</font><fontface="Arial"><br /></font><font face="Courier New" size="2">(</font><font face="Arial"><br
/></font><fontface="Courier New" size="2">  id text NOT NULL,</font><font face="Arial"><br /></font><font face="Courier
New"size="2">  byte bit(8) NOT NULL,</font><font face="Arial"><br /></font><font face="Courier New" size="2"> 
CONSTRAINTtest_bit_pkey PRIMARY KEY (id)</font><font face="Arial"><br /></font><font face="Courier New"
size="2">)</font><br/><font face="Courier New" size="2">WITHOUT OIDS;</font><font face="Arial"><br /></font><font
face="CourierNew" size="2">ALTER TABLE test_bit OWNER TO assux;</font><font face="Arial"> </font><p><font face="Arial"
size="2">Insertwith pgadmin:</font><font face="Arial"><br /></font><font face="Courier New"
size="2">hello,10101010</font><fontface="Arial"><br /></font><br /><font face="Arial" size="2">ERROR: bit string length
1does not match type bit(8)</font><p><font face="Arial" size="2">Insert with psql:</font><font face="Arial"><br
/></font><fontface="Courier New" size="2">INSERT INTO test_bit (id,byte) VALUES ('hello', B'10101010');</font><font
face="Arial"><br/></font><font face="Courier New" size="2">INSERT 0 1</font><font face="Arial"> </font><p><font
face="CourierNew" size="2">My Pgadmin Version:<br /> 1.8.4, Windows XP, SP2<br /> 1.9.0-dev, Windows XP, SP2</font><br
/><fontface="Courier New" size="2">1.8.4, Linux SuSE 11.0</font><p><font face="Courier New" size="2">PostgreSQL
Version:</font><br/><font face="Courier New" size="2">8.2.4, SuSE 10.0</font><br /><font face="Courier New"
size="2">8.3.1,SuSE 11.0</font><p><span lang="zh-cn"><font color="#0000FF" face="SartoriusRotisMail">Thanks a lot in
advance!</font></span><p><spanlang="de"><b><font face="Arial" size="2">Michael Pfütz</font></b><font face="Arial">
</font></span><br/><br /><a href="http://www.blackspider.com/"><font color="#000000" style="BACKGROUND-COLOR:
#ffffff"></font></a><p><br/><font face="Arial" size="2">Disclaimer :</font><p>The information contained in this e-mail
isintended only for the individual<br />addressed. If you have received this e-mail by mistake, please notify us<br
/>immediatelyby return reply. Be sure to delete this message and all its<br />attachments from your system. Please note
thatany unauthorized review,<br />copying, disclosure or any other use of this information is strictly<br />prohibited.
E-mailtransmission cannot be guaranteed to be secure or<br />error-free as information could be intercepted, corrupted,
lost,destroyed,<br />received late or incomplete, or could contain viruses. The sender therefore<br />does not accept
anyliability for any error or omission in the content of<br />this message, either of which are caused as a result of
e-mailtransmission.<br />If verification is required, please request a hard-copy version. <br />Thank you. 

Re: bug: Bit String Types

From
"Dave Page"
Date:
On Thu, Oct 9, 2008 at 1:45 PM, Pfuetz, Michael
<Michael.Pfuetz@sartorius.com> wrote:
> Hello,
>
> i think there is bugs in pgadmin:
> CREATE TABLE test_bit
> (
>   id text NOT NULL,
>   byte bit(8) NOT NULL,
>   CONSTRAINT test_bit_pkey PRIMARY KEY (id)
> )
> WITHOUT OIDS;
> ALTER TABLE test_bit OWNER TO assux;
>
> Insert with pgadmin:
> hello,10101010
>
> ERROR: bit string length 1 does not match type bit(8)

Thanks - fixed for the next release.

Regards, Dave

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com