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

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Viktor Rosenfeld <listuser36(at)googlemail(dot)com>
Cc: Henry Drexler <alonup8tb(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Use true and false when bulk-exporting boolean data
Date: 2011-10-18 18:16:45
Message-ID: E1C41CE1-EF51-449E-9D8C-197C24481C43@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-10-18 18:17:10 Re: pg_dump not including custom CAST based on table types
Previous Message Samuel Hwang 2011-10-18 17:39:32 Can someone help explain what's going on from the attached logs?