From: | Andrew M Tracey <traceyam(at)dcs(dot)gla(dot)ac(dot)uk> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | constraints don't work... |
Date: | 1998-09-05 18:23:31 |
Message-ID: | Pine.GSO.4.02A.9809051838400.1339-100000@speedwell |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
I'm busy trying to set up a database for project.
I'm using postgresql, but I don't know which version - as the:
<select version();>
command doesn't work, the message:
<Syntax error at or near "version">
is given, in addition to this the constraints don't work when I'm entering
tables - I type:
< create table genetic_line (
name varchar(6) not null,
chromosome_location int,
phenotype varchar(80),
staining_pattern varchar(80),
first_citation varchar(80),
unique (name)
); >
and I get the messege:
< WARN:parser: Syntax error at or near "unique" >
for constraints <primary key> and <foreign key>, where I put in:
< create table genetic_line (
name varchar(6) not null,
chromosome_location int,
phenotype varchar(80),
staining_pattern varchar(80),
first_citation varchar(80),
primary key (name)
); >
I get:
< WARN:parser: Syntax error at or near "name" >
so this one does't appear to like the use of <primary key> as opposed to
the actual word <unique> in the previous example.
Could anyone point me in the right direction please!?
thanks,
Andrew Tracey.
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Lynch | 1998-09-06 04:27:08 | Datetime in humane format |
Previous Message | The Hermit Hacker | 1998-09-05 04:33:03 | Re: [SQL] Creating Indexes for MAC and IP Data Types |