Re: casting from integer to boolean

From: Seb <spluque(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: casting from integer to boolean
Date: 2008-03-26 22:28:18
Message-ID: 87abklqfwd.fsf@patagonia.sebmags.homelinux.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 26 Mar 2008 15:11:47 -0700,
"Richard Broersma" <richard(dot)broersma(at)gmail(dot)com> wrote:

[...]

> INSERT INTO my_table (var_bool) VALUES ( CAST( 0 AS BOOLEAN )); or
> INSERT INTO my_table (var_bool) VALUES (0::BOOLEAN);

Thanks Richard. Is there a way to do it without changing the INSERT
command? As I mentioned, there are many more columns of different
types, so finding and replacing the VALUES would be very difficult.

--
Seb

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Rich 2008-03-26 22:34:59 Re: casting from integer to boolean
Previous Message Richard Broersma 2008-03-26 22:11:47 Re: casting from integer to boolean