Re: cataloguing NOT NULL constraints - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: cataloguing NOT NULL constraints
Date
Msg-id CAEZATCVE6tNOK3uZfsb_neBRv-3fcDpFxPQH_JSpwvcjDDAxrw@mail.gmail.com
Whole thread Raw
In response to Re: cataloguing NOT NULL constraints  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: cataloguing NOT NULL constraints  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
Something else I noticed: the error message from ALTER TABLE ... ADD
CONSTRAINT in the case of a duplicate constraint name is not very
friendly:

ERROR:  duplicate key value violates unique constraint
"pg_constraint_conrelid_contypid_conname_index"
DETAIL:  Key (conrelid, contypid, conname)=(16540, 0, nn) already exists.

To match the error message for other constraint types, this should be:

ERROR:  constraint "nn" for relation "foo" already exists

Regards,
Dean



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: cataloguing NOT NULL constraints
Next
From: Bharath Rupireddy
Date:
Subject: Re: logical decoding and replication of sequences, take 2