Re: [GENERAL] Empty arrays with ARRAY[] - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: [GENERAL] Empty arrays with ARRAY[]
Date
Msg-id 877ik0cael.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: [GENERAL] Empty arrays with ARRAY[]  ("Brendan Jurd" <direvus@gmail.com>)
Responses Re: [GENERAL] Empty arrays with ARRAY[]
List pgsql-hackers
"Brendan Jurd" <direvus@gmail.com> writes:

> The patch is very invasive (at least compared to any of my previous
> patches), but so far I haven't managed to find any broken behaviour.

I'm sorry to suggest anything at this point, but... would it be less invasive
if instead of requiring the immediate cast you created a special case in the
array code to allow a placeholder object for "empty array of unknown type".
The only operation which would be allowed on it would be to cast it to some
specific array type.

That way things like

UPDATE foo SET col = array[];
INSERT INTO foo (col) VALUES (array[]);

could be allowed if they could be contrived to introduce an assignment cast.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's RemoteDBA services!

pgsql-hackers by date:

Previous
From: "Usama Dar"
Date:
Subject: Re: Release Note Changes
Next
From: Tatsuo Ishii
Date:
Subject: Re: PostGreSQL and recursive queries...