On Mon, Jun 21, 2004 at 08:18:07AM +0100, Hebert, Caroline wrote:
> Short Description : ECPG doesn't return the correct length for an empty
> VARCHAR
I'm sorry, but this is not a bug but an incorrectly used feature.
> I compiled with :
> * /usr/local/pgsql/bin/ecpg -r no_indicator pg_empty_varchar.pgc
When using "-r no_indicator" an empty string in a varchar is considered
a NULL value. So you essantially put a NULL value in the database and
then read it and try to use it as if it was not NULL.
If you remove this option it works fine.
As an explanation, this option came in as a compatibility option to
Informix. But it can also be used without Informix as you see. I wonder
if I should make this option only callable in compatibility mode.
Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!