Re: boolean - Mailing list pgsql-general

From Stephane Bortzmeyer
Subject Re: boolean
Date
Msg-id 20020920131436.GA28459@nic.fr
Whole thread Raw
In response to boolean  ("Henrik Steffen" <steffen@city-map.de>)
List pgsql-general
On Fri, Sep 20, 2002 at 02:49:25PM +0200,
 Henrik Steffen <steffen@city-map.de> wrote
 a message of 113 lines which said:

> and if i insert into foo (foobar) values('bar') without
> explicitly inserting a value for bar, the bar column of this
> particular row will be empty. it's neither 't' nor 'f'.

Actually, it will be NULL. Unless you add a constraint NOT NULL to the
column.

> But I want to know, how I can select all rows which neither
> match 't' nor 'f' ? To perform an update like
>
> UPDATE foo SET bar='t' WHERE bar=null;

... WHERE bar IS NULL;

(It is a common SQL problem, the handling of NULL values. Read any
book about SQL.)


pgsql-general by date:

Previous
From: "Henrik Steffen"
Date:
Subject: boolean
Next
From: Murali Mohan Kasetty
Date:
Subject: Data Dump Issue