Re: serial arrays?

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: serial arrays?
Date: 2008-03-21 17:05:01
Message-ID: 65937bea0803211005i591332cfkcb44879fbf4272da@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 21, 2008 at 10:25 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> A recent message from a would-be mysql converter led me to realize
> that we don't check for array decoration when we expand "serial".
> So this is accepted but doesn't do what one might expect:
>
> regression=# create table foo (f1 serial[11]);
> NOTICE: CREATE TABLE will create implicit sequence "foo_f1_seq" for
> serial column "foo.f1"
> CREATE TABLE
> regression=# \d foo
> Table "public.foo"
> Column | Type | Modifiers
> --------+---------+--------------------------------------------------
> f1 | integer | not null default nextval('foo_f1_seq'::regclass)
>
>
> Should we throw an error for this?

+1

> If not, what behavior would be
> sane?
>
>
I don't see any sane explanation if we do provide that syntax!!!

Best regards,
--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

17° 29' 34.37"N, 78° 30' 59.76"E - Hyderabad *
18° 32' 57.25"N, 73° 56' 25.42"E - Pune
37° 47' 19.72"N, 122° 24' 1.69" W - San Francisco

http://gurjeet.frihost.net

Mail sent from my BlackLaptop device

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2008-03-21 17:45:11 Re: Commit Fest (was Re: Sort Refinement)
Previous Message Simon Riggs 2008-03-21 17:01:35 Re: Auto Partitioning Patch - WIP version 1