Re: Uniqueness of rule, constraint, and trigger names

From: "Dan Langille" <dan(at)langille(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: Uniqueness of rule, constraint, and trigger names
Date: 2002-03-04 20:04:45
Message-ID: 200203042004.g24K4lk79699@lists.unixathome.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

On 4 Mar 2002 at 14:24, Tom Lane wrote:

> For constraints, we'd need to change the code to be more careful to
> generate unique names for unnamed constraints. That doesn't seem
> difficult, but I'm a little worried about the possibility of errors
> in loading schemas from existing databases, where there might be
> non-unique constraint names.

Create a tool to generate unique constraint names during a dump. Sounds
like a pg_dump[all] switch to me.

> Perhaps it'd be safer to maintain the
> current behavior (no uniqueness required for constraint names).

I would rather see a simple and unambigous way to maintain a single
constraint. Perhaps a "unique/not-unique" knob is appropriate.
--
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Eric Scroger 2002-03-04 20:28:57 JDBC: java.sql.SQLException: results returned
Previous Message Bruce Momjian 2002-03-04 19:57:44 Re: [Fwd: [PATCHES] Libpq support for precision and scale]

Browse pgsql-sql by date

  From Date Subject
Next Message Hubert Palme 2002-03-04 20:34:25 PL/pgSQL Syntax Problem
Previous Message Tom Lane 2002-03-04 19:24:08 Uniqueness of rule, constraint, and trigger names