From: Michael Glaesemann <grzm@seespotcode.net>
To: Erik Jones <erik@myemma.com>
Cc: Gera Mel Handumon <geramel.h@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: NULLIF problem
Date: Thu, 29 Nov 2007 07:46:03 -0500
Message-ID: <B98CA260-7332-4DB5-B4CF-462B5FB2C71D@seespotcode.net> (raw)
In-Reply-To: <F0B783FE-5CDA-4B67-99AA-0F0731308D68@myemma.com>
References: <474404120711271804y21b8e0b3j7f4b3771c088a82a@mail.gmail.com>
<17DF2022-C1D2-4D9E-ABAC-DC3F5B20FBE7@seespotcode.net>
<F0B783FE-5CDA-4B67-99AA-0F0731308D68@myemma.com>
On Nov 28, 2007, at 14:00 , Erik Jones wrote:
> Why not just:
>
> UPDATE table
> SET mytime=NULL
> WHERE mytime='';
If mytime is a timestamp field, it won't have any values ''. I
believe the OP is updating mytime to a client-supplied value which is
passing '' when it probably means NULL.
Michael Glaesemann
grzm seespotcode net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: grzm@seespotcode.net, erik@myemma.com, geramel.h@gmail.com
Subject: Re: NULLIF problem
In-Reply-To: <B98CA260-7332-4DB5-B4CF-462B5FB2C71D@seespotcode.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox