Re: [INTERFACES] MSAccess and primary keys

From: "Geoffrey C(dot) Speicher" <geoff(at)sirius(dot)trassociates(dot)com>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] MSAccess and primary keys
Date: 1999-05-15 13:19:03
Message-ID: Pine.BSF.4.05.9905150915230.43429-100000@sirius.speicher.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Sat, 15 May 1999 leif(at)danmos(dot)dk wrote:

> create table globalafvigelse
> (
> id serial ,
> startdato date,
> slutdato date,
> dagskema varchar(50),
> primary key (globalafvigelse)
> );

You're misusing the PRIMARY KEY constraint; you're supposed to give it a
list of attributes which function as the primary key for the table. I'm
surprised that was accepted at all. I think what you want is:

create table globalafvigelse
(
id serial,
...
primary key (serial)
);

Geoff

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michael J Davis 1999-05-15 16:23:58 RE: [INTERFACES] MSAccess and primary keys
Previous Message Frans van Elsacker 1999-05-15 13:10:09 subscribe