pg_dump and boolean format

From: Scott Frankel <frankel(at)circlesfx(dot)com>
To: PostgreSQL List <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump and boolean format
Date: 2010-08-11 17:00:29
Message-ID: F73AC05F-61DF-4A8D-BBC8-34575B5112EE@circlesfx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi all,

Is it possible to control the representation of boolean data in a
pg_dump?

The pg docs say that booleans can be stored as 't', 'true', 'y',
'yes', or '1'. My db is storing them as 't' and pg_dump is outputing
them as 'true'. Can I coerce pg_dump to output 't' as 1?

I'm using pg_dump to create an SQL script for importing into another
database. This will happen automatically and repeatedly.
Unfortunately, the other database (sqlite) is limited to only integer
representation of booleans: 0 or 1.

I'm currently using the following command:

pg_dump -aDFp -v mydatabase > mydatabase_BAK.sql

Thanks!
Scott

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2010-08-11 17:12:13 Re: Finding last checkpoint time
Previous Message Greg Smith 2010-08-11 16:42:01 Re: pgtune