serial arrays?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: serial arrays?
Date: 2008-03-21 16:55:26
Message-ID: 25588.1206118526@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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? If not, what behavior would be
sane?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Warren Turkal 2008-03-21 16:55:33 Re: [PATCH] Add TimeOffset and DateOffset typedefs
Previous Message Simon Riggs 2008-03-21 16:53:44 Re: Auto Partitioning Patch - WIP version 1