Problems with char array set to NULL

Поиск
Список
Период
Сортировка
От jlapham@gandalf.bioqmed.ufrj.br
Тема Problems with char array set to NULL
Дата
Msg-id 200006051425.LAA30854@gandalf.bioqmed.ufrj.br
обсуждение исходный текст
Ответы Re: Problems with char array set to NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello-

I've noticed a difference in the behavior between how v6.5.3 and v7.0.0
handle NULL assignments for char arrays (see below for the simple
example).  Maybe I should be using '{}' to nullify a char array instead of
NULL?  Either way, it would seem to me that the behavior with v7.0.0
should be the same as v6.5.3.  And, as you can see below, the response
from v7.0.0 is to terminate the connection to the db backend... which
seems severe.

I am running a variety of i686 linux systems (RedHat 6.2 with home rolled
v2.2.15 kernels), using src compiled Pg.  I have been able to duplicate
this behavior on a number of machines.

-Jon

PS: This is a re-send of a message I posted 5 days ago (~1 June) which
appears to not have made it to the list, probably due to something I
did.  If you received this message before, my apologies.

------------------------
v6.5.3:
template1=> create table a (id char[2]);
CREATE
template1=> insert into a (id) values (NULL);
INSERT 112733 1

------------------------
v7.0.0:
template1=# create table a (id char[2]);
CREATE
template1=# insert into a (id) values (NULL);
pqReadData() -- backend closed the channel unexpectedly.This probably means the backend terminated abnormallybefore or
whileprocessing the request.
 
The connection to the server was lost. Attempting reset: Failed.


-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*---Jon Lapham, PhDCentro Nacional de Ressonancia
MagneticaNuclear de MacromoleculasUniversidade Federal do Rio de Janeiro (UFRJ) - Brasilemail:
jlapham@gandalf.bioqmed.ufrj.br 
 
***-*--*----*-------*------------*--------------------*---------------


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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: Commit messages list
Следующее
От: Kevin Lo
Дата:
Сообщение: Re: pg on NT