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

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 (view raw or flat)
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 -------------------------------------------------------------

pgsql-docs by date

Next:From: bbaaleDate: 1999-05-19 09:05:37
Subject: New user ...
Previous:From: Thomas LockhartDate: 1999-05-11 17:06:42
Subject: Re: Doc

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