pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kuba Ouhrabka <kuba@comgate.cz>
To: pgsql-interfaces@postgresql.org
Subject: ecpg: arrays and nulls
Date: Tue, 02 Aug 2005 10:40:23 +0200
Message-ID: <dcnbhr$13ed$1@news.hub.org> (raw)

Hi,

I'd like to ask how to handle null values when fetching arrays into 
ecpg. Always I get this error:

Data read from backend is not an array in line ...

I'm using indicators and I use char * variables for array values (for 
all column types: int[], text[], bytea[]). It works when the value of 
array is not null but when it's null I get the error above.

Can null values in columns of array type be handled in more convenient 
way than using coalesce/nullif and special reserved value?

Thanks,                     Kuba



view thread (3+ messages)  latest in thread

Message-ID: <dcnbhr$13ed$1@news.hub.org>
Permalink:  ../dcnbhr$13ed$1@news.hub.org/
Also on:    postgresql.org/message-id/dcnbhr$13ed$1@news.hub.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-interfaces@postgresql.org
  Cc: kuba@comgate.cz
  Subject: Re: ecpg: arrays and nulls
  In-Reply-To: <dcnbhr$13ed$1@news.hub.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