Tom Lane writes:

> A considerable advantage of per-relation constraint names is that a new
> unique name can be assigned for a nameless constraint while holding only
> a lock on the target relation.  We'd need a global lock to create unique
> constraint names in the SQL92 semantics.

Presumably, the field pg_class.relchecks already keeps a count of the
number of constraints, so it should be possible to assign numbers easily.

> The only way I can see around that would be to use newoid(), or perhaps
> a dedicated sequence generator, to construct constraint names.  The
> resulting unpredictable constraint names would be horribly messy to deal
> with in the regression tests, so I'm not eager to do this.

Or we simply assign constraint names explicitly in the regression tests.

-- 
Peter Eisentraut   [EMAIL PROTECTED]




---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Reply via email to