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

2011-10-18 Thread Viktor Rosenfeld
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 b

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

2011-10-18 Thread Alban Hertroys
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 th

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

2011-10-18 Thread Viktor Rosenfeld
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,

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

2011-10-17 Thread Henry Drexler
On Mon, Oct 17, 2011 at 3:11 PM, Henry Drexler wrote: > couldn't you just wrap it in a case statement to change the t to true > etc...? > > example: select case when (1=1) = true then 'true' else 'false' end

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

2011-10-17 Thread Henry Drexler
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 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 > pr

[GENERAL] Use true and false when bulk-exporting boolean data

2011-10-17 Thread Viktor Rosenfeld
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