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

From: Viktor Rosenfeld <listuser36(at)googlemail(dot)com>
To: Alban Hertroys <haramrae(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 18:56:02
Message-ID: 20111018185602.GA18040@client195-204.wlan.hu-berlin.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Alban,

in the end I used a COPY statement with a query and a CASE statement as
suggested by Henry.

Cheers,
Viktor

Alban Hertroys wrote:

> On 18 Oct 2011, at 17:54, Viktor Rosenfeld wrote:
>
> > 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.
>
>
> You are aware that COPY accepts a query as well?
> You could also have created a VIEW over that table that translates those values.
>
> Alban Hertroys
>
> --
> If you can't see the forest for the trees,
> cut the trees and you'll see there is no forest.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2011-10-18 19:43:31 value too long - but for which column?
Previous Message John R Pierce 2011-10-18 18:43:47 Re: Postgre Performance