Re: Use true and false when bulk-exporting boolean data

From: Viktor Rosenfeld <listuser36(at)googlemail(dot)com>
To: Henry Drexler <alonup8tb(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Use true and false when bulk-exporting boolean data
Date: 2011-10-18 15:54:30
Message-ID: 20111018155430.GA14013@client195-204.wlan.hu-berlin.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I was looking for an easier, more automatic way, but I wrote a few
scripts that wrapped the boolean fields in case statements as suggested.

Thanks,
Viktor

Henry Drexler wrote:

> couldn't you just wrap it in a case statement to change the t to true
> etc...?
>
> On Mon, Oct 17, 2011 at 2:29 PM, Viktor Rosenfeld <listuser36(at)googlemail(dot)com
> > wrote:
>
> > 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
> >
> > --
> > Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-general
> >

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Kerr 2011-10-18 15:58:35 What's the impact of archive_command failing?
Previous Message Tom Lane 2011-10-18 14:50:23 Re: Out of Memory Error on Insert