From: Joseph Shraibman <jks@p1.selectacast.net>
To: pgsql-interfaces@postgreSQL.org <pgsql-interfaces@postgreSQL.org>
Subject: ifnull
Date: Thu, 09 Mar 2000 00:51:28 -0500
Message-ID: <38C73BDF.B4C83976@selectacast.net> (raw)
Could someone tell me how to use ifnull? Whenever I try it postgres
tells me:
playpen=> insert into tabled (userkey, value) values (2, ifnull(null,
'c'));
ERROR: No such function 'ifnull' with the specified attributes
What I need it for is when I do an insert into my table like this:
playpen=> insert into tabled select max(userkey) + 1, 'texthere';
ERROR: ExecAppend: Fail to add null value in not null attribute userkey
... I get a problem when I'm inserting the first data into the table
because max returns null.
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-interfaces@postgresql.org
Cc: jks@p1.selectacast.net
Subject: Re: ifnull
In-Reply-To: <38C73BDF.B4C83976@selectacast.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