Skip site navigation (1) Skip section navigation (2)

attribute of type 'serial not null'

From: Christof Petig <christof(dot)petig(at)wtal(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: attribute of type 'serial not null'
Date: 1999-09-27 13:58:35
Message-ID: 37EF7808.DB7E0186@wtal.de (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi,

one might argue whether it is a bug that
  create table t ( k serial not null ) ;
is invalid while
  create table t ( k serial ) ;
is ok. But since this should not be illegal (a serial is not null by
definition) and it kills iX's SQL benchmark (iX is a german computer
magazine) I vote for ignoring the trailing not null.

(Of course you could use 'int4 not null' as your key's type, but you'd
lose 'serial's built in index facilities). No show stopper, just
annoying (since other databases seem to allow it).

Christof
PS: I would post test results (but the database crashed after inserting
130441 [out of 1 million] tuples). Still looking closer at it (had been
last week's CVS version).
PPS: The benchmark also creates an unique key on the 'serial' column, so
int4 would be legal as well.



pgsql-bugs by date

Next:From: Tim NewellDate: 1999-09-27 15:12:04
Subject: Bug in index creation
Previous:From: Craig DockterDate: 1999-09-26 21:54:46
Subject: 6.5.2 create index bug?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group