Use true and false when bulk-exporting boolean data

From: Viktor Rosenfeld <listuser36(at)googlemail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Use true and false when bulk-exporting boolean data
Date: 2011-10-17 18:29:24
Message-ID: 20111017182924.GB9299@client199-86.wlan.hu-berlin.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I need to move data from PostgreSQL to MonetDB and also bulk-import data
into MonetDB that was bulk-exported from PostgreSQL by other people. My
problem is that boolean data is exported by PostgreSQL using the values
"t" and "f" (unquoted) and that MonetDB expects "true" and "false". Is
there a way to change how boolean columns are exported?

I'm using the following command to export:

\copy table to 'filename' WITH NULL 'NULL';

And to import (in MonetDB):

copy into table from '/path/to/filename' USING DELIMITERS '\t','\n','';

Cheers,
Viktor

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2011-10-17 19:05:10 Re: 9.1 got really fast ;)
Previous Message David McKeone 2011-10-17 17:08:04 Re: Mac OS X 10.6 - libpq.dylib vs. libpq.a and PQisthreadsafe()