Re: analyze-error: "cannot compare arrays of different element types" revisited - Mailing list pgsql-general

From Tom Lane
Subject Re: analyze-error: "cannot compare arrays of different element types" revisited
Date
Msg-id 24011.1103317768@sss.pgh.pa.us
Whole thread Raw
In response to analyze-error: "cannot compare arrays of different element types" revisited  ("Florian G. Pflug" <fgp@phlo.org>)
List pgsql-general
"Florian G. Pflug" <fgp@phlo.org> writes:
> Since postgres disallows empty array literals (array[] gives an syntax
> error), I guess creating empty array by removing the last element is
> quite hackish too... Will empty arrays be eventually supported, or will
> they be forbidden entirely (e.g, making "array[1] - 1" return null)?

They're supported now, but you have to write something like
    '{}'::int8[]
since "array[]" doesn't provide any context for guessing the intended
array element type.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: sorting problem
Next
From: Jerry LeVan
Date:
Subject: Re: OSX 10.3.7 broke Postgresql 8.0.0b5?