Re: Array constructor requires one argument - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Array constructor requires one argument
Date
Msg-id 20070109224219.GD8359@svana.org
Whole thread Raw
In response to Re: Array constructor requires one argument  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Array constructor requires one argument
List pgsql-general
On Tue, Jan 09, 2007 at 04:09:21PM -0500, Tom Lane wrote:
> Joe Conway <mail@joeconway.com> writes:
> > Unless we can convince ourselves that array-of-UNKNOWN is not dangerous,
> > I don't think this is easily solved.
>
> One possibility that might handle Martijn's problem is to allow the
> construct
>
>     ARRAY[]::type[]

This was in fact the solution I came up with. It also helps with the
confusion, because the error didn't state the actual problem. At least
this could could say "empty array needs typecast".

I don't think it would be too hard to fix, I'll look tomorrow.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Andrew Kroeger
Date:
Subject: Re: ERROR: invalid memory alloc request size, and others
Next
From: Andrew Kroeger
Date:
Subject: Re: ERROR: invalid memory alloc request size, and others