-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 30 August 2003 09:06, Andrew Dunstan wrote: > There is no guarantee that a given sequence is used only for one column > in one table, as I understand it. So renaming it could screw you up > badly. > > If we made 'serial-ness' first class, and hid the sequence completely > from view, this would make more sense. >
I'm just trying to make the following novice mistake less confusing: CREATE TABLE test (id SERIAL PRIMARY KEY); ALTER TABLE test TO old_test; CREATE TABLE test (id SERIAL PRIMARY KEY); - -> ERROR: Already a sequence with that name, already an index with that name I don't think that hiding the sequence completely from the user is a good idea. They may want to manipulate the sequence later. I like Tom's idea of just telling people that this is what happens, and if they get too intimate with the system tables and the sequences and indexes that are automatically created, it's their own fault. - -- Jonathan Gardner [EMAIL PROTECTED] Live Free, Use Linux! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/UN5CWgwF3QvpWNwRAgr5AKCfEfqU4NqWO60+tc6x6zkrqY9EgwCgwD4X F3Sns/QFfneuijSG8fT85K4= =l5nJ -----END PGP SIGNATURE----- ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]