Re: Array_append does not work with Array variables in PL/pgSQL?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Array_append does not work with Array variables in PL/pgSQL?
Date: 2004-04-01 21:48:26
Message-ID: 200404011348.26646.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Joe,

> You have to initialize the array to something non-null, even if that be
> an empty array (note that there is a difference). When trying to append
> an element to a NULL valued array, you wind up with a NULL result. It is
> similar to:

Aha!

I knew that I was missing something fundamental.

BTW, did you get my e-mail to Hackers about ARRAY[] IS NULL?

--
-Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Joe Conway 2004-04-01 21:51:47 Re: Array_append does not work with Array variables in PL/pgSQL?
Previous Message Joe Conway 2004-04-01 21:36:45 Re: Array_append does not work with Array variables in PL/pgSQL?