Re: function returning array

From: "Dennis" <pg-user(at)calico-consulting(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, postgres SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: function returning array
Date: 2004-04-15 14:03:37
Message-ID: courier.407E9639.000006B0@wolverine.lercnetworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2004-04-15 14:50:33 Re: cursors and for loops?
Previous Message Charles Wilt 2004-04-15 13:50:09 Re: Database triggers