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

Re: Weirdness with

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Weirdness with
Date: 2006-01-30 09:30:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Jan 30, 2006 at 04:44:21PM +0800, Christopher Kings-Lynne wrote:
> I had this code in a script:
> UPDATE food_foods SET included=true WHERE verification_status = 'I';
> UPDATE food_foods SET included=false WHERE verification_status IS NULL;
> I tried replacing it with:
> UPDATE food_foods SET included=(verification_status = 'I');

(NULL = 'I')   is null, not false. It will simply set rows where
verification_status is NULL to NULL also.

Perhaps you mean IS NOT DISTNCT FROM or something similar?

Have a nice day,
Martijn van Oosterhout   <kleptog(at)svana(dot)org>
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

pgsql-hackers by date

Next:From: Martijn van OosterhoutDate: 2006-01-30 10:10:12
Subject: Re: Want to add to contrib.... xmldbx
Previous:From: Thomas HallgrenDate: 2006-01-30 09:25:39
Subject: Re: Want to add to contrib.... xmldbx

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