Tom Lane wrote:
Alvaro Herrera [EMAIL PROTECTED] writes:
On Thu, Nov 06, 2003 at 11:42:13AM -0500, Tom Lane wrote:
I don't have a problem with switching from $1 to tablename_$1, or
some such, for auto-generated constraint names. But if it's not
guaranteed unique, does it really satisfy
Bruce Momjian wrote:
Tom Lane wrote:
Alvaro Herrera [EMAIL PROTECTED] writes:
On Thu, Nov 06, 2003 at 11:42:13AM -0500, Tom Lane wrote:
I don't have a problem with switching from $1 to tablename_$1, or
some such, for auto-generated constraint names. But if it's not
guaranteed
Bruce Momjian [EMAIL PROTECTED] writes:
Tom Lane wrote:
regression=# create table foo (f1 int check (f1 0) check (f1 10));
ERROR: check constraint foo_f1 already exists
Is this a TODO to fix?
Probably should be. I'd be inclined to try to fix it by generating
foo_f1_1, foo_f1_2, etc until
Tom Lane wrote:
Bruce Momjian [EMAIL PROTECTED] writes:
Tom Lane wrote:
regression=# create table foo (f1 int check (f1 0) check (f1 10));
ERROR: check constraint foo_f1 already exists
Is this a TODO to fix?
Probably should be. I'd be inclined to try to fix it by generating
Andrew Dunstan [EMAIL PROTECTED] writes:
I think there are several of them from this thread:
. make autogenerated column constraint names unique per table (by adding
_$n ?)
Check.
. add tableoid or tablename to information_schema.{check_constraints,
referential_constraints} (I think
Tom Lane wrote:
Andrew Dunstan [EMAIL PROTECTED] writes:
. add tableoid or tablename to information_schema.{check_constraints,
referential_constraints} (I think those are the only places where it
would be needed, from my quick skimming).
. add tableoid or tablename to autogenerated table
Tom Lane wrote:
Using tableoid instead of tablename avoids renaming problems, but makes
the names horribly opaque IMNSHO.
Agreed. I think using the OIDs would be a horrible choice.
As a point of reference Oracle uses a naming convention of 'C' where
is a sequence generated unique
Barry Lind wrote:
Tom Lane wrote:
Using tableoid instead of tablename avoids renaming problems, but makes
the names horribly opaque IMNSHO.
Agreed. I think using the OIDs would be a horrible choice.
As a point of reference Oracle uses a naming convention of 'C' where
Philip Warner [EMAIL PROTECTED] writes:
Notice that the two records are identical because the two constraint names
are the same. ISTM that we should have a way of usefully examining specific
constraints without having to name them. Can we add the constraint OID or
No. The schemas of the
Tom Lane wrote:
The reason the spec defines these views this way is that it expects
constraint names to be unique across a whole schema. We don't enforce
that, and I don't think we want to start doing so (that was already
proposed and shot down at least once). You are of course free to use
Andrew Dunstan [EMAIL PROTECTED] writes:
The reason the spec defines these views this way is that it expects
constraint names to be unique across a whole schema. We don't enforce
that, and I don't think we want to start doing so (that was already
proposed and shot down at least once).
Would
Tom Lane writes:
Would a good halfway house be to ensure that generated names were unique
within a schema (e.g. instead of generating $1 generate
tablename$1)?
No, because that buys into all of the serialization and deadlocking
problems that doing it the spec's way entail
I don't think
Peter Eisentraut [EMAIL PROTECTED] writes:
I don't think we really need a method to guarantee unique names. It would
already help a lot if we just added the table name, or something that was
until a short time before the action believed to be the table name, or
even only the table OID, before
On Thu, Nov 06, 2003 at 11:42:13AM -0500, Tom Lane wrote:
Peter Eisentraut [EMAIL PROTECTED] writes:
I don't think we really need a method to guarantee unique names. It would
already help a lot if we just added the table name, or something that was
until a short time before the action
Alvaro Herrera [EMAIL PROTECTED] writes:
On Thu, Nov 06, 2003 at 11:42:13AM -0500, Tom Lane wrote:
I don't have a problem with switching from $1 to tablename_$1, or
some such, for auto-generated constraint names. But if it's not
guaranteed unique, does it really satisfy Philip's concern?
It
Tom Lane wrote:
Peter Eisentraut [EMAIL PROTECTED] writes:
I don't think we really need a method to guarantee unique names. It would
already help a lot if we just added the table name, or something that was
until a short time before the action believed to be the table name, or
even only the
16 matches
Mail list logo