Web pgadmin.org
 Home 
 ·  ·  ·  ·  ·  ·  · 
bug in pgadmin 1.8.2: Create script command doesn't recognize inherited

bug in pgadmin 1.8.2: Create script command doesn't recognize inherited fields at the end of the list



Prerequisites:

pgAdmin 1.8.2, Windows Xp SP2, Postgres 8.3.0

Steps to reproduce:


1)Run the following sequence.

create table basic_table(
a integer,
b integer);


create table derived_table(
c integer
) inherits (basic_table);


create table basic_table_b
(d integer);

alter table derived_table add column d integer;
alter table derived_table inherit basic_table_b;

2)Right click on derived_table and select "Scripts->CREATE script".
You should see the following text:

-- Table: derived_table

-- DROP TABLE derived_table;

CREATE TABLE derived_table
(
-- Inherited:   a integer,
-- Inherited:   b integer,
  c integer,
-- Inherited:   d integer
)
INHERITS (basic_table, basic_table_b)
WITH (OIDS=FALSE);
ALTER TABLE derived_table OWNER TO postgres;

which is incorrect because "c integer" is followed by "," though it it
is at the end of the list.

Peter G.




Home | Main Index | Thread Index

top