bug in 7.0 - Mailing list pgsql-hackers

From Don Baccus
Subject bug in 7.0
Date
Msg-id 3.0.1.32.20000228071601.00fc90a0@mail.pacifier.com
Whole thread Raw
Responses Re: [HACKERS] bug in 7.0
List pgsql-hackers
This is probably related to Lockhart's changes to allow
not null/not deferrable to work (foreign key stuff).  I'm
sympathetic, I looked at gram.y for awhile myself trying to
figure a way out of the problem and didn't find a good
solution.

Anyway:

donb=# create table bar(i integer unique not null);
ERROR:  parser: parse error at or near "not"
donb=# create table bar(i integer not null unique);
ERROR:  parser: parse error at or near "unique"
donb=# create table bar(i integer unique);
NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'bar_i_key' for
table 'bar'
CREATE
donb=# 


Ouch.   Fails on "primary key not null", etc too (though the
not null is redundant in this case).

The data model I'm porting from Oracle fails several hundred
times now because of this little problem...I guess my last
snapshot was just before Thomas' committed those changes,
otherwise I would've caught them before beta.



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: ALTER TABLE DROP COLUMN
Next
From: Jose Soares
Date:
Subject: NOT NULL doesn't work in v7