Declaring empty, non-NULL array in plpgsql

From: CSN <cool_screen_name90001(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Declaring empty, non-NULL array in plpgsql
Date: 2003-11-24 05:11:35
Message-ID: 20031124051135.37111.qmail@web40601.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a way to declare an array in plpgsql so that
it's empty (not NULL)? The following causes arr to end
up being NULL:

arr varchar[];
-- do stuff with arr..
arr = array_append(arr, '','');

And this causes an unwanted element at the front:

arr varchar[] := array[''''];
-- do stuff with arr..
arr = array_append(arr, '','');

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message CSN 2003-11-24 05:26:25 Re: Declaring empty, non-NULL array in plpgsql
Previous Message Randolf Richardson 2003-11-24 05:09:46 Re: Where is Postgesql ? - MYSQL SURPRISES WITH MAXDB /