7.0.3 Bitset dumping

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: 7.0.3 Bitset dumping
Date: 2001-03-09 04:37:18
Message-ID: NEBBIODEHDOLHLJPJCDDCEHICAAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In case anyone cares, there is a bug in pg_dump in 7.0.3 when using the bit
fields.

eg: (This is a dump)

INSERT INTO "menu_plans" VALUES (7,'B''100000000''');
INSERT INTO "menu_plans" VALUES (6,'B''100000000''');
INSERT INTO "menu_plans" VALUES (8,'B''100000000''');

I think what's happening is that pg_dump is automatically putting quotes
around the fields, and escaping quotes in the string. Strangely enough, if
this dump is restored then you get your original bitset back, with a zero
appended to each end! Has this been fixed in 7.1?

Actually, I think that in 7.0.3's parser implementation they should be
dumped as :

INSERT INTO "menu_plans" VALUES (7,'b100000000');
INSERT INTO "menu_plans" VALUES (6,'b100000000');
INSERT INTO "menu_plans" VALUES (8,'b100000000');

--
Christopher Kings-Lynne
Family Health Network (ACN 089 639 243)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Denis Perchine 2001-03-09 05:34:42 Re: Internationalized error messages
Previous Message Tom Lane 2001-03-09 04:33:57 Re: How to handle waitingForLock in LockWaitCancel()