BUG #8395: empty aclitem arrays are considered 1-dimensional

From: bashtanov(at)imap(dot)cc
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #8395: empty aclitem arrays are considered 1-dimensional
Date: 2013-08-23 16:17:55
Message-ID: E1VCu3f-0000Hh-JU@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 8395
Logged by: Alexey Bashtanov
Email address: bashtanov(at)imap(dot)cc
PostgreSQL version: 9.1.9
Operating system: Ubuntu linux 12.04
Description:

Empty aclitem arrays are considered 1-dimensional, but in general empty
arrays are 0-dimensional. It leads to the following problems:

STEPS TO REPRODUCE
1) install fresh postgres, connect to it
2) select relacl, relacl = '{}'::aclitem[], (select aclexplode(relacl)),
array_length(relacl, 1) from pg_class where oid::regclass =
'pg_largeobject'::regclass;
3) select aclexplode('{}'::aclitem[]);

EXPECTED
2) {}, false, null, null
3) no error, zero-lines table

GOT
2) relacl | ?column? | ?column? | array_length
--------+----------+----------+--------------
{} | f | | 0
3) ERROR: ACL arrays must be one-dimensional

also it can be reproduced on some 9.2 version

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Kellerer 2013-08-23 20:12:52 Re: BUG #8394: SQL command REINDEX doesn't work
Previous Message yzhang 2013-08-23 16:00:09 BUG #8394: SQL command REINDEX doesn't work