Re: function returning array - Mailing list pgsql-sql

From Dennis
Subject Re: function returning array
Date
Msg-id courier.407E9639.000006B0@wolverine.lercnetworks.com
Whole thread Raw
In response to Re: function returning array  (Joe Conway <mail@joeconway.com>)
List pgsql-sql
Joe Conway writes: 

>> dennis'#                 pParsed         varchar[];
> 
> Make that last line:
>                            pParsed         varchar[] := ''{}''; 
> 
> That initializes pParsed to an *empty* array. Otherwise pParsed is NULL, 
> and when you attempt to extend a NULL array, e.g. "pParsed[1] = ''blah''" 
> you still get NULL. 

Joe, thank you very much! It makes much sense now that you tell me, but it 
was obviously not something I thought of. 

Dennis
pg-user a t calico-consulting dot com


pgsql-sql by date:

Previous
From: Joe Conway
Date:
Subject: Re: function returning array
Next
From: Dimitar Georgievski
Date:
Subject: Update is very slow on a bigger table