From: | blackgr <blackgr(at)alltel(dot)net> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | problem creating table |
Date: | 1999-07-01 21:17:35 |
Message-ID: | Pine.LNX.4.10.9907011627130.829-100000@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
I haven't been able to get following definition for table entity to work. I
keep getting a "parse error at or near position." The definition for table
phone works fine. I can delete the line with the definition for position and
the table is created, but why escapes me at the moment. Any clues appreciated.
Glynn Black blackgr(at)alltel(dot)net
CREATE SEQUENCE entity_id_seq;
CREATE TABLE entity (
entity_id_number int4 DEFAULT NEXTVAL('entity_id_seq'),
name varchar(60) not null,
address1 varchar(60) not null,
address2 varchar(60),
city varchar(60) not null,
state char(2) not null,
zip char(10) not null,
description varchar(60),
type int2 not null,
position int2 not null,
PRIMARY KEY (entity_id_number));
CREATE SEQUENCE phone_id_seq;
CREATE TABLE phone (
phone_id_number int4 DEFAULT NEXTVAL('phone_id_seq'),
entity int4 not null,
type int2 not null,
phone_number char(7) not null,
area_code char(3) not null,
PRIMARY KEY (phone_id_number));
From | Date | Subject | |
---|---|---|---|
Next Message | Kyle Bateman | 1999-07-01 23:29:40 | Re: [SQL] begin/end/abort work for sequences? |
Previous Message | Fomichev Michael | 1999-07-01 20:37:39 | Re: [SQL] DISTINCT on multiple fields (fwd) |