pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: German Raul Hoyos Parravicino <rhoyos@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Fwd: Question
Date: Tue, 7 Mar 2006 16:44:55 -0700
Message-ID: <20060307234455.GA36726@winnie.fuhr.org> (raw)
In-Reply-To: <912a25750603071409p1204d1f6je8dc7fb13f68cca5@mail.gmail.com>
References: <912a25750603071236y6e61aa8ajb314650012d63928@mail.gmail.com>
	<912a25750603071409p1204d1f6je8dc7fb13f68cca5@mail.gmail.com>

On Tue, Mar 07, 2006 at 05:09:56PM -0500, German Raul Hoyos Parravicino wrote:
> I have a problem developing a ECPG program. I am making a programa using
> FETCH, when the second row is sent the following message appear:
> 
> ==>sqlcode [-213] msg[NULL value without indicator in line 1192.]
[...]
> Is it possible to use something similar to "isnull" in Oracle?

Are you looking for the SQL-standard COALESCE?

test=> SELECT COALESCE('foo', 'bar');
 coalesce 
----------
 foo
(1 row)

test=> SELECT COALESCE(NULL, 'bar');
 coalesce 
----------
 bar
(1 row)

See also the ECPG documentation on using indicators to detect NULL.

-- 
Michael Fuhr



view thread (32+ messages)  latest in thread

Message-ID: <20060307234455.GA36726@winnie.fuhr.org>
Permalink:  ../20060307234455.GA36726@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20060307234455.GA36726@winnie.fuhr.org

 · 

reply

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-admin@postgresql.org
  Cc: mike@fuhr.org, rhoyos@gmail.com
  Subject: Re: Fwd: Question
  In-Reply-To: <20060307234455.GA36726@winnie.fuhr.org>

* 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