Re: Bug report - multidimensional arrays - Mailing list pgadmin-support

From Dave Page
Subject Re: Bug report - multidimensional arrays
Date
Msg-id CA+OCxox_Y0KGpCQEgGHfBrr2L=GE5rLAkSNeNPLeCqeXhyomfA@mail.gmail.com
Whole thread Raw
In response to Bug report - multidimensional arrays  (Joshua Boshi <joshuaboshi@gmail.com>)
Responses Re: Bug report - multidimensional arrays
List pgadmin-support
Hi

On Fri, May 31, 2013 at 6:36 PM, Joshua Boshi <joshuaboshi@gmail.com> wrote:
> Hi,
>
> I would like to report a bug on pgAdmin 1.16.1 installed on Ubuntu 13.04
> from repository.
> PgAdmin ignores multidimensional array types in it's outputs.
>
> I defined a table using this command:
>
> CREATE TABLE test (
> id serial NOT NULL,
> test character varying(150)[][],
> PRIMARY KEY (id)
> ) WITH (
>   OIDS = FALSE
> );
>
> And when I selected the table in pgAdmin this was shown in the SQL pane:
>
> -- Table: test
>
> -- DROP TABLE test;
>
> CREATE TABLE test
> (
>   id serial NOT NULL,
>   test character varying(150)[],
>   CONSTRAINT test_pkey PRIMARY KEY (id)
> )
> WITH (
>   OIDS=FALSE
> );
> ALTER TABLE test
>   OWNER TO joshua;
>
>
> I don't know if this is a known issue, but it confused me for a moment.

PostgreSQL doesn't keep track of multi vs. single dimensional array
declarations, as array types are undimensioned anyway. You'll see the
same in psql:

postgres=# CREATE TABLE test (
id serial NOT NULL,
test character varying(150)[][],
PRIMARY KEY (id)
) WITH (
OIDS = FALSE
);
NOTICE:  CREATE TABLE will create implicit sequence "test_id_seq" for
serial column "test.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"test_pkey" for table "test"
CREATE TABLE
postgres=# \d test
               Table "public.test"Column |           Type           |                     Modifiers
--------+--------------------------+---------------------------------------------------id     | integer
| not null default
 
nextval('test_id_seq'::regclass)test   | character varying(150)[] |
Indexes:   "test_pkey" PRIMARY KEY, btree (id)



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgadmin-support by date:

Previous
From: Tomasz Wrzodak
Date:
Subject: Lost characters when typing
Next
From: Joshua Boshi
Date:
Subject: Re: Bug report - multidimensional arrays