Handling of nullable columns in embedded SQL

From: Rolf Cohn <rolf(dot)cohn(at)alcatel(dot)no>
To: docs(at)postgresql(dot)org
Cc: Rolf Cohn <rolf(dot)cohn(at)alcatel(dot)no>
Subject: Handling of nullable columns in embedded SQL
Date: 1999-05-12 09:19:19
Message-ID: 37394797.B884C573@alcatel.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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(dot)Cohn(at)alcatel(dot)no
v -------------------------------------------------------------

Browse pgsql-docs by date

  From Date Subject
Next Message bbaale 1999-05-19 09:05:37 New user ...
Previous Message Thomas Lockhart 1999-05-11 17:06:42 Re: Doc