Re: ECPG doesn't return the correct length for an empty

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: ECPG doesn't return the correct length for an empty
Дата
Msg-id 20040621091255.GB9046@trantor.fam-meskes.de
обсуждение исходный текст
Ответ на ECPG doesn't return the correct length for an empty  ("Hebert, Caroline" <caroline.hebert@eds.com>)
Список pgsql-bugs
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!

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Hebert, Caroline"
Дата:
Сообщение: ECPG doesn't return the correct length for an empty
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1175: insert rule action with defaults