Skip site navigation (1) Skip section navigation (2)

Information regarding foriegn key constraint.

From: meeta bhate <mbhate(at)eng(dot)utoledo(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Cc: ajohnso(at)uoft03(dot)utoledo(dot)edu, ajohnson(at)eng(dot)utoledo(dot)edu
Subject: Information regarding foriegn key constraint.
Date: 2001-06-08 05:50:38
Message-ID: 5.0.2.1.0.20010608013934.00a312a0@pop3.eng.utoledo.edu (view raw or flat)
Thread:
Lists: pgsql-bugs
Dear Sir,
I am a Graduate student at the University of Toledo.My Master's project 
involves creating a database  in PostgreSQL version 6.5.3.I was wondering 
if I can use SERIAL key along with a PRIMARY key as follows:

create table ohiouniv (uid serial primary key,
                        uname varchar(45) not null,
                        ucity varchar(25) not null);

create table departments (deptid serial primary key,
                           deptshrtn varchar(10) not null,
                           deptfulln varchar(45) not null,
                           deptphone int8 unique not null check(deptphone>0));

When I tried giving the following for linking the above 2 tables:

create table univdept (uid integer references ohiouniv,
                                     deptid integer references departments);

The error was:
create table/foreign key clause ignored; not yet implemented

Does this mean we cannot use the foreign key constraint in this version of 
PostgreSQL, and if so, what is the alternative for the above problem.Please 
let me know about this at your earliest convinience.
Thanks much!
Best Regards
Meeta Bhate
University of Toledo.
EECS Department.
Ph:419 450 3685.


Responses

pgsql-bugs by date

Next:From: Rony KhouryDate: 2001-06-08 09:20:34
Subject: furiously yours
Previous:From: Tom LaneDate: 2001-06-08 03:34:50
Subject: Re: Apparent deadlock for simultaneous sequential scans

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group