From: Rolf Cohn <rolf.cohn@alcatel.no>
To: docs@postgresql.org
Cc: Rolf Cohn <rolf.cohn@alcatel.no>
Subject: Handling of nullable columns in embedded SQL
Date: Wed, 12 May 1999 11:19:19 +0200
Message-ID: <37394797.B884C573@alcatel.no> (raw)
Hello!
How to treat NULL values in queries?
1) Is there an equivalent to the IFNULL (CA-Ingres)/NVL (Oracle)
functions?
Example:
EXEC SQL SELECT IFNULL(foo, -1) FROM bar INTO :dummy;
2) Is it possible to create a host variable
to put the NULL value indicator which then can be checked?
Example:
EXEC SQL SELECT foo FROM bar INTO :dummy_null_ind:dummy;
I have gone through the PostgreSQL Programmer's Guide and
the PostgreSQL User's Guide but did not find the answers.
Did I miss something?
Regards
--
vvvvvvvvv --------------------------------------------------------
vvvvvvv Rolf Cohn
vvvvv Alcatel Telecom
vvv Norway AS E-mail: mailto:Rolf.Cohn@alcatel.no
v -------------------------------------------------------------
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-docs@postgresql.org
Cc: rolf.cohn@alcatel.no, docs@postgresql.org
Subject: Re: Handling of nullable columns in embedded SQL
In-Reply-To: <37394797.B884C573@alcatel.no>
* 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