Re: [GENERAL] pg_dump and boolean format

2010-08-11 Thread Scott Frankel
On Aug 11, 2010, at 3:57 PM, Michael Glaesemann wrote: On Aug 11, 2010, at 18:21 , Scott Frankel wrote: On Aug 11, 2010, at 10:12 AM, Michael Glaesemann wrote: One option is to use COPY to export the data in a format you like. For example: COPY (SELECT CAST(boolean_column AS INT) FROM

Re: [GENERAL] pg_dump and boolean format

2010-08-11 Thread Michael Glaesemann
On Aug 11, 2010, at 18:21 , Scott Frankel wrote: > > On Aug 11, 2010, at 10:12 AM, Michael Glaesemann wrote: > >> One option is to use COPY to export the data in a format you like. For >> example: COPY (SELECT CAST(boolean_column AS INT) FROM my_table) TO STDOUT. >> Then write a script which

Re: [GENERAL] pg_dump and boolean format

2010-08-11 Thread Scott Frankel
On Aug 11, 2010, at 10:12 AM, Michael Glaesemann wrote: On Aug 11, 2010, at 13:00 , Scott Frankel wrote: The pg docs say that booleans can be stored as 't', 'true', 'y', 'yes', or '1'. Booleans are not "stored" as those literals: those are only acceptable literals (i.e., string represen

Re: [GENERAL] pg_dump and boolean format

2010-08-11 Thread Michael Glaesemann
On Aug 11, 2010, at 13:00 , Scott Frankel wrote: > The pg docs say that booleans can be stored as 't', 'true', 'y', 'yes', or > '1'. Booleans are not "stored" as those literals: those are only acceptable literals (i.e., string representations) for boolean values. > I'm using pg_dump to create

[GENERAL] pg_dump and boolean format

2010-08-11 Thread Scott Frankel
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