On Oct 21, 2008, at 13:00, Andrew Chernow wrote:
On Oct 21, 2008, at 12:08, Simon Riggs wrote:
If we got rid of zero dimension arrays, how would I declare a new
empty array in a PL/pgSQL function?
Why would you want to do that? Is there a use case for that?
Perhaps not. In older versions of PostgreSQL, I *had* to initialize an
empty array in a DECLARE block or else I couldn't use it with
array_append() to collect things in an array in a loop. I don't have
to do so 8.3, but I keep it that way in some modules for compatibility
reasons.
But since that was perhaps an issue with older versions of PostgreSQL
that has since been addressed, I guess I just think too much like a
Perl hacker, where I can add things to an array as I need to. That's
different from SQL arrays, where you can't add a value to an existing
array, create a new array from an old one plus a new value.
So I guess I don't *have* to have it, but for compatibility with older
versions of PostgreSQL, I think they should be kept.
Best,
David
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers