boolean as 0 and 1

From: "A B" <gentosaker(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: boolean as 0 and 1
Date: 2008-04-08 09:54:09
Message-ID: dbbf25900804080254u4114154frede5d81376805555@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
Is there a way to make postgresql to automatically convert integer
values to boolean?

Consider

create table x (a boolean);
insert into x (a) values (1);

the inser fails :-(
Is there a way to make it work without altering the insert command?

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Shoaib Mir 2008-04-08 09:59:15 Re: boolean as 0 and 1
Previous Message Pavel SRB 2008-04-08 04:32:37 Re: alter table