Re: [BUGS] Assigning null to an array element in plpgsql

2005-11-16 Thread Tom Lane
Eugene Chow <[EMAIL PROTECTED]> writes: > I believe this is a bug. The following function returns 'foo' instead > of null: NULLs in arrays aren't supported; the system interprets an attempt to store a NULL into an array element as a no-op. Perhaps it should have raised an error instead, but it'

[BUGS] Assigning null to an array element in plpgsql

2005-11-16 Thread Eugene Chow
Hi all, I believe this is a bug. The following function returns 'foo' instead of null: --- create or replace function test() returns varchar as ' declare s varchar[] := ''{}''; begin s[1] := ''foo''; s[1] := null; return s[1]; end; ' l