Обсуждение: Bug report - multidimensional arrays
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.
Regards,
Josh
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
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>
HiPostgreSQL doesn't keep track of multi vs. single dimensional array
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.
declarations, as array types are undimensioned anyway. You'll see the
same in psql:
postgres=# CREATE TABLE test (id serial NOT NULL,NOTICE: CREATE TABLE will create implicit sequence "test_id_seq" for
test character varying(150)[][],
PRIMARY KEY (id)
) WITH (
OIDS = FALSE
);
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