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

From Tom Lane
Subject Re: Array constructor requires one argument
Date
Msg-id 10359.1168376961@sss.pgh.pa.us
Whole thread Raw
In response to Re: Array constructor requires one argument  (Joe Conway <mail@joeconway.com>)
Responses Re: Array constructor requires one argument  (David Fetter <david@fetter.org>)
Re: Array constructor requires one argument  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
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[]

that is, you can have an empty ARRAY construct only if you immediately
cast it to a specific array type.  The application typically knows what
type the data is anyway, and if it just always plasters on the cast then
the syntax would work regardless of whether there are any elements or not.

            regards, tom lane

pgsql-general by date:

Previous
From: Tony Caduto
Date:
Subject: Re: is there a tracking trace tool like the "SQL Analizer
Next
From: Jonathan Hedstrom
Date:
Subject: Re: ERROR: invalid memory alloc request size, and others