Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-19 Thread Bruce Momjian
Joe Conway wrote: Tom Lane wrote: Joe Conway [EMAIL PROTECTED] writes: I agree 100%. If you want an index, unique constraint, or primary key on a SERIAL, I think you should explicitly add it. SERIAL should give me a column that automatically increments -- no more, no less. Hmm, do

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-19 Thread Stephan Szabo
On Mon, 19 Aug 2002, Bruce Momjian wrote: Joe Conway wrote: Tom Lane wrote: Joe Conway [EMAIL PROTECTED] writes: I agree 100%. If you want an index, unique constraint, or primary key on a SERIAL, I think you should explicitly add it. SERIAL should give me a column that automatically

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-18 Thread Joe Conway
Tom Lane wrote: Joe Conway [EMAIL PROTECTED] writes: I agree 100%. If you want an index, unique constraint, or primary key on a SERIAL, I think you should explicitly add it. SERIAL should give me a column that automatically increments -- no more, no less. Hmm, do you also want to eliminate

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-18 Thread Þórhallur Hálfdánarson
Hi -*- Joe Conway [EMAIL PROTECTED] [ 2002-08-18 06:36 ]: Maybe I should restate my comment above: SERIAL should give me a column that automatically increments -- no more, no less -- and it should not allow me to override the value that it gives. Hence an implicit NOT NULL, but also an

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-18 Thread Tom Lane
Joe Conway [EMAIL PROTECTED] writes: I know this causes problems for dumped and reloaded data. Yup. In MSSQL this is gotten around by allowing the properties of the data type to be altered, e.g. in MSSQL you can turn the IDENTITY property on or off Rather pointless if it can be turned

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-18 Thread Joe Conway
Tom Lane wrote: Joe Conway [EMAIL PROTECTED] writes: In MSSQL this is gotten around by allowing the properties of the data type to be altered, e.g. in MSSQL you can turn the IDENTITY property on or off Rather pointless if it can be turned off, wouldn't you say? Not really. Turning it off

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-18 Thread Joe Conway
Rod Taylor wrote: In MSSQL this is gotten around by allowing the properties of the data type to be altered, e.g. in MSSQL you can turn the IDENTITY property on or off Rather pointless if it can be turned off, wouldn't you say? What I would do if I wanted such a guarantee is to make insertions

[HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-17 Thread Rod Taylor
I'd like to propose dropping the auto-creation of UNIQUE indexes on serial columns for the following reasons: 1. Serials with indexes are quite difficult to handle in pg_dump. It means that the implicitly created unique index must be destroyed prior to loading the data, then re-created

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-17 Thread Joe Conway
Rod Taylor wrote: I'd like to propose dropping the auto-creation of UNIQUE indexes on serial columns for the following reasons: 1. Serials with indexes are quite difficult to handle in pg_dump. It means that the implicitly created unique index must be destroyed prior to loading the data,

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-17 Thread Tom Lane
Joe Conway [EMAIL PROTECTED] writes: I agree 100%. If you want an index, unique constraint, or primary key on a SERIAL, I think you should explicitly add it. SERIAL should give me a column that automatically increments -- no more, no less. Hmm, do you also want to eliminate the implicit NOT