Thread: serial datatype changes for v7.3?
Hi, I'm playing around with the CVS version and noticed a change from 7.2 in regards to serial datatypes - they no longer automatically have an index. Is this a deliberate thing? I did a search in the archives but didn't come across mention of the change. A pointer to discussion on this would be great. CREATE TABLE author ( authorid SERIAL, firstname VARCHAR(255), surname VARCHAR(255), dateofbirth DATE, gender CHAR(1) ); NOTICE: CREATE TABLE will create implicit sequence 'author_authorid_seq' for SERIAL column 'author.authorid' CREATE TABLE library=# \d author Table "public.author" Column | Type | Modifiers -------------+------------------------+-------------------------------------------------------------- authorid | integer | not null default nextval('public.author_authorid_seq'::text) firstname | character varying(255) | surname | character varying(255) |dateofbirth | date | gender | character(1) | library=# \di No relations found.
Chris <pghackers@designmagick.com> writes: > I'm playing around with the CVS version and noticed a change from 7.2 in > regards to serial datatypes - they no longer automatically have an > index. Is this a deliberate thing? Yes. The release notes mention: SERIAL no longer implies UNIQUE; specify explicitly if index is wanted regards, tom lane
Tom Lane wrote: > Chris <pghackers@designmagick.com> writes: > > I'm playing around with the CVS version and noticed a change from 7.2 in > > regards to serial datatypes - they no longer automatically have an > > index. Is this a deliberate thing? > > Yes. The release notes mention: > > SERIAL no longer implies UNIQUE; specify explicitly if index is wanted What was the logic for this change? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
Bruce Momjian <pgman@candle.pha.pa.us> writes: > Tom Lane wrote: >> Yes. The release notes mention: >> SERIAL no longer implies UNIQUE; specify explicitly if index is wanted > What was the logic for this change? See the thread back around 17 Aug: http://archives.postgresql.org/pgsql-hackers/2002-08/msg01336.php regards, tom lane
OK, we just need to make that clear in the release notes. I had forgotten about the change. --------------------------------------------------------------------------- Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > Tom Lane wrote: > >> Yes. The release notes mention: > >> SERIAL no longer implies UNIQUE; specify explicitly if index is wanted > > > What was the logic for this change? > > See the thread back around 17 Aug: > http://archives.postgresql.org/pgsql-hackers/2002-08/msg01336.php > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073