Обсуждение: Re: [QUESTIONS] update NOT NULL via LIBPQ

Поиск
Список
Период
Сортировка

Re: [QUESTIONS] update NOT NULL via LIBPQ

От
"Sergey S. Kosyakov"
Дата:
Yes. But I talk about LIBPQ. There should be some additional error code
like PGRES_QUERY_FAIL to distinguish from backend crash.

Sergey.

On 25-Mar-98 Vadim B. Mikheev wrote:
>Sergey S. Kosyakov wrote:
>>
>> Hi!
>>
>> Why PQexec(conn,query) returns FATAL_ERROR when query is update on
>> NOT NULL column with NULL value? The same error is produced when
>> backend core dumps, etc - that is, in the cases of TRUE fatal error.
>> I think that error status should not be equal for illegal query and
>> backend crashes.
>
>vac=> create table test (x int not null);
>CREATE
>vac=> insert into test values (1);
>INSERT 18473 1
>vac=> update test set x = null;
>ERROR:  ExecReplace: Fail to add null value in not null attribute x
>
>Vadim

---
----------------------------------
Sergey Kosyakov
Laboratory of Distributed Computing
Department of High-Performance Computing and Applied Network Research
Landau Institute for Theoretical Physics
E-Mail: ks@itp.ac.ru
Date: 25-Mar-98
Time: 12:04:47
----------------------------------
---