Re: Problems with char array set to NULL

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problems with char array set to NULL
Date: 2000-06-07 09:11:39
Message-ID: 393E11CB.92AE81DA@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> jlapham(at)gandalf(dot)bioqmed(dot)ufrj(dot)br writes:
> > v7.0.0:
> > template1=# create table a (id char[2]);
> > CREATE
> > template1=# insert into a (id) values (NULL);
> > pqReadData() -- backend closed the channel unexpectedly.
>

Just curious, but does postgreSQL support array _elements_ set to NULL.

hannu=# insert into arr values ('{1,2,3}');
INSERT 310985 1
hannu=# insert into arr values ('{1,NULL,3}');
ERROR: pg_atoi: error in "NULL": can't parse "NULL"

If not, should it ?

From my little knowledge on structure of storage I'd suppose it does
not and that it would require changing the array machinery to do so.

Maybe this question is more aproppriate for pgsql-hackers-oo(at)postgresql(dot)org
but for some strange reason my subscription confirmation was rejected to
all new pgsql-hackers-xxx lists with a message like this

-----8<-------------------8<-------------------8<-------------------8<--------------

>>>> accept
Token for command:
subscribe=request(at)postgresql(dot)org pgsql-hackers-smgr Hannu Krosing
<hannu(at)tm(dot)ee>
issued at: Wed May 24 15:04:23 2000 GMT
from sessionid: b9ac0349622ef0032295b46f5510bad9
was accepted with these results:

**** The following was not successfully added to pgsql-hackers-smgr:
Hannu Krosing <hannu(at)tm(dot)ee>

1 valid command processed; its status is indeterminate.

-----8<-------------------8<-------------------8<-------------------8<--------------

Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-06-07 10:33:23 AW: Problems with char array set to NULL
Previous Message Moucha Václav 2000-06-07 08:16:15 LIKE bug