pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dennis <pg-user@calico-consulting.com>
To: Joe Conway <mail@joeconway.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: postgres SQL <pgsql-sql@postgresql.org>
Subject: Re: function returning array
Date: Thu, 15 Apr 2004 10:03:37 -0400
Message-ID: <courier.407E9639.000006B0@wolverine.lercnetworks.com> (raw)
In-Reply-To: <407EB3DF.6010304@joeconway.com>
References: <courier.407C6CB0.00005135@wolverine.lercnetworks.com>
	<29772.1081913447@sss.pgh.pa.us>
	<courier.407E7D02.00006AB1@wolverine.lercnetworks.com>
	<407EB3DF.6010304@joeconway.com>

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



view thread (6+ messages)  latest in thread

Message-ID: <courier.407E9639.000006B0@wolverine.lercnetworks.com>
Permalink:  ../courier.407E9639.000006B0@wolverine.lercnetworks.com/
Also on:    postgresql.org/message-id/courier.407E9639.000006B0@wolverine.lercnetworks.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pg-user@calico-consulting.com, mail@joeconway.com, tgl@sss.pgh.pa.us
  Subject: Re: function returning array
  In-Reply-To: <courier.407E9639.000006B0@wolverine.lercnetworks.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox