pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew M Tracey <traceyam@dcs.gla.ac.uk>
To: pgsql-sql@postgresql.org
Subject: constraints don't work...
Date: Sat, 5 Sep 1998 19:23:31 +0100 (BST)
Message-ID: <Pine.GSO.4.02A.9809051838400.1339-100000@speedwell> (raw)

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.






Message-ID: <Pine.GSO.4.02A.9809051838400.1339-100000@speedwell>
Permalink:  ../Pine.GSO.4.02A.9809051838400.1339-100000@speedwell/
Also on:    postgresql.org/message-id/Pine.GSO.4.02A.9809051838400.1339-100000@speedwell

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: traceyam@dcs.gla.ac.uk
  Subject: Re: constraints don't work...
  In-Reply-To: <Pine.GSO.4.02A.9809051838400.1339-100000@speedwell>
  References: <Pine.GSO.4.02A.9809051838400.1339-100000@speedwell>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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