Bug or not?

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Bug or not?
Date: 2009-03-04 08:46:18
Message-ID: 49AE3FDA.3010606@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

I received a bug report some days (arg... months) before. I tried to
work on it sometime ago and again today, but I don't find a way to be
sure it is an actual bug in pgAdmin or something we can't do much right now.

Here are some psql commands to build a database that shows this issue:

CREATE DATABASE ioguix;
\c ioguix
CREATE TABLE t1 (id serial);
CREATE TABLE t2 (LIKE t1 INCLUDING DEFAULTS);

Now, launch pgAdmin3, click on the t2 table and then on the Dependents
tab. There's nothing in the listview. I assumed I would see the
t1_id_seq sequence, as showed by the SQL:

CREATE TABLE t2
(
id integer NOT NULL DEFAULT nextval('t1_id_seq'::regclass)
)
WITH (
OIDS=FALSE
);

I'm not sure PostgreSQL keeps this information somewhere (at least not
on the pg_depends catalog) but it sure is able to find it:

guillaume(at)laptop$ psql -q ioguix
ioguix=# drop table t1;
NOTICE: default for table t2 column id depends on sequence t1_id_seq
ERROR: cannot drop table t1 because other objects depend on it
ASTUCE : Use DROP ... CASCADE to drop the dependent objects too.

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2009-03-04 09:30:33 Re: Bug or not?
Previous Message svn 2009-03-03 13:13:21 SVN Commit by guillaume: r7642 - in trunk/pgadmin3/pgadmin: dlg schema