Received: from itp.ac.ru (itp.ac.ru [193.233.32.4]) by hub.org (8.8.8/8.7.5) with ESMTP id FAA20232; Wed, 25 Mar 1998 05:39:12 -0500 (EST) Received: from speecart.chg.ru (speecart.chg.ru [193.233.46.2]) by itp.ac.ru (8.8.7/8.8.3) with SMTP id MAA04186; Wed, 25 Mar 1998 12:06:36 +0300 (MSK) Message-ID: X-Mailer: XFMail 1.1 [p0] on FreeBSD Sender: ks@speecart.chg.ru Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit MIME-Version: 1.0 In-Reply-To: <3518C6C4.FBFF7AEE@sable.krasnoyarsk.su> Date: Wed, 25 Mar 1998 12:04:45 +0300 (MSK) Organization: Landau Institute for Theoretical Physics From: "Sergey S. Kosyakov" To: "Vadim B. Mikheev" Subject: Re: [QUESTIONS] update NOT NULL via LIBPQ Cc: pgsql-questions@postgreSQL.org, pgsql-interfaces@postgreSQL.org 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 ---------------------------------- ---