Thanks for that Dave,
I don't mind it not displaying the
constraint as an index but the one thing I would ask for is
consistency...
For example if I create the following table via
SQL:
CREATE TABLE public.tbl_cmpycat (
id int4 NOT NULL,
s_desc text NOT NULL,
id_editedby int4,
dt_edited timestamp,
CONSTRAINT tbl_cmpycat_desc_key UNIQUE (s_desc),
CONSTRAINT tbl_cmpycat_pkey PRIMARY KEY
(id)
) WITHOUT OIDS;
When I view it under pgAdminII it lists one index
named tbl_cmpycat_desc_key...?
This then leads on to another bug...
When I try to drop the above table (not the index)
pgAdminII attempts to drop the index first and then I get the following message
as recorded in the log.
21-01-2003 12:52:17 - SQL (Bugs): DROP INDEX
public.tbl_cmpycat_desc_key
21-01-2003 12:52:17 - Error in pgAdmin II:basActions.Drop: -2147467259 - ERROR: Cannot drop index tbl_cmpycat_desc_key because constraint tbl_cmpycat_desc_key on table tbl_cmpycat requires it You may drop constraint tbl_cmpycat_desc_key on table tbl_cmpycat instead Regards
Donald Fraser
----- Original Message -----
From: Dave
Page
Sent: Tuesday, January 21, 2003 12:28 PM
Subject: RE: [pgadmin-support] Strange bug... Hi
Donald,
This
is a feature, not a bug :-)
Seriously, pgAdmin figures out that the index is part of a constraint and
classes it as a system object, therefore hiding it. If you switch on View System
Objects on the View menu, you will see both indexes under the table. My guess is
that pg_dump is not quite so clever and misses the UNIQUE constraint from the
table definition, adding the index manually instead.
Regards, Dave.
|
Title: Message
- [pgadmin-support] Strange bug... Donald Fraser
- Re: [pgadmin-support] Strange bug... Dave Page
- Re: [pgadmin-support] Strange bug... Donald Fraser
- Re: [pgadmin-support] Strange bug... Dave Page