Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Is there a way to make postgresql to automatically convert integer
values to boolean?


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?


pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group