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

VARCHAR references

From: Justin Seiferth <seiferth(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: VARCHAR references
Date: 2001-05-03 21:53:35
Message-ID: (view raw or whole thread)
Lists: pgsql-novice
I have a problem with the insert form for table
eq_list. PostdgeQSL enforces the constraint on v_id
and will not allow record to be inserted unless the
the v_id exist in the vendor table

However for reason I do not understand PostgreSQL is
not enforcing the  constraint that the proj_id exist
in the project table ????

I tried to check the table design but could not find a
command in psql that detail foreign keys or other
constraints. How can I display table constraints????

I created the table with the following file

CREATE TABLE eq_list (
description	VARCHAR(128),
v_id		INT4 REFERENCES vendor,
rate		NUMERIC(8,2),
proj_id		VARCHAR(10) REFERENCES project,
in_service	BOOL DEFAULT 't'


My web page is at:

Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

pgsql-novice by date

Next:From: Peter J. SchoensterDate: 2001-05-04 00:50:28
Subject: Re: input from a file
Previous:From: Eric Naujock Date: 2001-05-03 19:17:20
Subject: Re: input from a file

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