Lists: | pgsql-hackers |
---|
From: | Chris <pghackers(at)designmagick(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | serial datatype changes for v7.3? |
Date: | 2002-09-02 14:00:43 |
Message-ID: | 3D736F0B.4090202@designmagick.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
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.
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Chris <pghackers(at)designmagick(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: serial datatype changes for v7.3? |
Date: | 2002-09-02 14:56:46 |
Message-ID: | 21472.1030978606@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Chris <pghackers(at)designmagick(dot)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
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Chris <pghackers(at)designmagick(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: serial datatype changes for v7.3? |
Date: | 2002-09-02 15:23:13 |
Message-ID: | 200209021523.g82FNDt12789@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Chris <pghackers(at)designmagick(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Chris <pghackers(at)designmagick(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: serial datatype changes for v7.3? |
Date: | 2002-09-02 16:12:17 |
Message-ID: | 23333.1030983137@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Chris <pghackers(at)designmagick(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: serial datatype changes for v7.3? |
Date: | 2002-09-02 16:34:38 |
Message-ID: | 200209021634.g82GYc121800@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
OK, we just need to make that clear in the release notes. I had
forgotten about the change.
---------------------------------------------------------------------------
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(at)postgresql(dot)org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073