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: dbbf25900804080254u4114154frede5d81376805555@mail.gmail.com (view raw or flat)
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

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-2014 The PostgreSQL Global Development Group