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

From Joshua Boshi
Subject Re: Bug report - multidimensional arrays
Date
Msg-id CAEv=SQeDuZ5XSz0n2t=3uvieJakxwN1w77kX1poyW7yz0DU1qA@mail.gmail.com
Whole thread Raw
In response to Re: Bug report - multidimensional arrays  (Dave Page <dpage@pgadmin.org>)
List pgadmin-support
Hi Dave,

thank you for reply.
I did not notice this in PostgreSql documentation. It is clear to me now.

Best regards,
Josh



2013/6/3 Dave Page <dpage@pgadmin.org>
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: Dave Page
Date:
Subject: Re: Bug report - multidimensional arrays
Next
From: "Ellinghaus, Lance"
Date:
Subject: pgadmin3 for Solaris 10 SPARC