Re: Quick question - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Quick question
Date
Msg-id 3003.1005676679@sss.pgh.pa.us
Whole thread Raw
In response to Re: Quick question  (Brent Verner <brent@rcfile.org>)
Responses Re: Quick question
List pgsql-hackers
Brent Verner <brent@rcfile.org> writes:
>   ISTM, that these sequences created by way of a SERIAL type should 
> be named "pg_serial_test_id_HASH" or similar, since they are system
> (bookkeeping) rels.  Also, I /personally/ would like it if the sequence
> was dropped along with the table using it, provided that no other atts 
> in the system are using it.

I think there are two completely different issues here: one is what
name to use for the auto-generated sequence, and the other is whether
(when) to drop the sequence if the table is dropped.  Fixing the
latter issue would reduce but not entirely eliminate the issue of
name collisions.

IIRC, the major objection to the notion of adding random hash characters
to the auto-generated names was that people wanted to be able to predict
the names.  There was a long discussion about this a couple years back
when we settled on the present algorithm.  Please search the archives
a bit if you want to re-open that issue.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Knut Forkalsrud
Date:
Subject: Re: 'real' strange problem in 7.1.3
Next
From: Bruce Momjian
Date:
Subject: Re: Open items