Re: Array constructor requires one argument

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Joe Conway <mail(at)joeconway(dot)com>, Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Array constructor requires one argument
Date: 2007-01-09 22:42:19
Message-ID: 20070109224219.GD8359@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 09, 2007 at 04:09:21PM -0500, Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2007-01-09 22:46:01 Re: Questions about horizontal partitioning
Previous Message Andrew Kroeger 2007-01-09 22:39:28 Re: ERROR: invalid memory alloc request size, and others