pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedproblem creating table
4+ messages / 3 participants
[nested] [flat]
* problem creating table
@ 1999-07-01 21:17 blackgr <blackgr@alltel.net>
0 siblings, 2 replies; 4+ messages in thread
From: blackgr @ 1999-07-01 21:17 UTC (permalink / raw)
To: 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@alltel.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));
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] problem creating table
@ 1999-07-03 16:22 Tom Lane <tgl@sss.pgh.pa.us>
parent: blackgr <blackgr@alltel.net>
1 sibling, 1 reply; 4+ messages in thread
From: Tom Lane @ 1999-07-03 16:22 UTC (permalink / raw)
To: blackgr <blackgr@alltel.net>; +Cc: pgsql-sql
blackgr <blackgr@alltel.net> writes:
> I haven't been able to get following definition for table entity to work. I
> keep getting a "parse error at or near position."
Not certain, but I think "position" may be a reserved word in SQL. Pick
a different name for the field.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] problem creating table
@ 1999-07-04 09:58 Oliver Graf <olli@casbah.ruhr.de>
parent: blackgr <blackgr@alltel.net>
1 sibling, 0 replies; 4+ messages in thread
From: Oliver Graf @ 1999-07-04 09:58 UTC (permalink / raw)
To: blackgr <blackgr@alltel.net>; pgsql-sql
> [...]
> CREATE TABLE entity (
> [...]
> position int2 not null,
CONSTRAINT entitiy_pk
> PRIMARY KEY (entity_id_number));
>
> [...]
>
> CREATE TABLE phone (
> [...]
> area_code char(3) not null,
CONSTRAINT phone_pk
> PRIMARY KEY (phone_id_number));
--
Oliver Graf
Oberhofstr. 11
D-44575 Castrop-Rauxel, Germany
Phone: +49 2305 14230
http://www.ruhr.de/home/casbah/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] problem creating table
@ 1999-07-06 21:08 blackgr <blackgr@alltel.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 4+ messages in thread
From: blackgr @ 1999-07-06 21:08 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql
Correct... Thanks.
Glynn Black blackgr@alltel.net
On Sat, 3 Jul 1999, Tom Lane wrote:
> blackgr <blackgr@alltel.net> writes:
> > I haven't been able to get following definition for table entity to work. I
> > keep getting a "parse error at or near position."
>
> Not certain, but I think "position" may be a reserved word in SQL. Pick
> a different name for the field.
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~1999-07-06 21:08 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-07-01 21:17 problem creating table blackgr <blackgr@alltel.net>
1999-07-03 16:22 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-07-06 21:08 ` blackgr <blackgr@alltel.net>
1999-07-04 09:58 ` Oliver Graf <olli@casbah.ruhr.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox