"P. Dwayne Miller" <dmiller@espgroup.net> writes:
> CREATE TABLE message
> (
> int4 msgid not null,
> text msgtext,
> CONSTRAINT cons_001_pk PRIMARY KEY on (msgid)
> );
> The first two actually create a PRIMARY KEY on msgid. The third seems
> to have a PRIMARY KEY on 'oid', not 'msgid', though it does create a
> unique index on 'msgid'.
After fixing the several obvious syntax errors, it works fine for me:
regression=# CREATE TABLE message
regression-# (
regression(# msgid int4 not null,
regression(# msgtext text,
regression(# CONSTRAINT cons_001_pk PRIMARY KEY (msgid)
regression(# );
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'cons_001_pk' for table 'message'
CREATE
regression=# \d message Table "message"Attribute | Type | Modifier
-----------+---------+----------msgid | integer | not nullmsgtext | text |
Primary Key: cons_001_pk
regression=#
Is Cold Fusion perhaps doing strange things to the query behind your
back? None of those CREATE TABLE commands are legal SQL according
to my references.
regards, tom lane