On Thu, Jun 30, 2016 at 9:25 PM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
> CREATE FUNCTION pg_temp.bad() RETURNS text[] LANGUAGE plpythonu AS $$return
> []$$;
> SELECT pg_temp.bad();
> bad
> -----
> {}
> (1 row)
>
> SELECT pg_temp.bad() = '{}'::text[];
> ?column?
> ----------
> f
> (1 row)
>
> Erm?? Turns out this is because
>
> SELECT array_dims(pg_temp.bad()), array_dims('{}'::text[]);
> array_dims | array_dims
> ------------+------------
> [1:0] |
> (1 row)
Yeah, that's a bug.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company