Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

SQL display of inheriting tables wrong



The SQL visualization of tables that inherit from another table is wrong in 
pgAdmin.  You can check that with the table "emp" in the regression test 
database.  The actual definition (as produced by pg_dump) is this:

CREATE TABLE person (
    name text,
    age integer,
    "location" point
);

CREATE TABLE emp (
    salary integer,
    manager name
)
INHERITS (person);


pgAdmin produces this:

CREATE TABLE emp
(
  name text,
  age int4,
  "location" point,
  salary int4,
  manager name
) INHERITS (person) 
WITH OIDS;

While this also works (the common columns are merged), executing this and 
redumping it with pg_dump produces this:

CREATE TABLE emp (
    name text,
    age integer,
    "location" point,
    salary integer,
    manager name
)
INHERITS (person);

which is not the same we started out with.

I'm not exactly sure what is going on here, but it's confusing.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group