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

Foreign Keys

From: mltasmaniac(at)tasjackson(dot)com
To: pgsql-novice(at)postgresql(dot)org
Subject: Foreign Keys
Date: 2009-01-11 02:36:46
Message-ID: 10582.116.240.253.8.1231641406.squirrel@tasjackson.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hi List,

	Ok I apologize if this is obvious etc but .....

 2 tables (trying to keep question simple)

table 1
tbl_id primary key
tbl2_acro foreign key table2.acro
other_col

table 2
acro primary key

OK person that knows what they are doing puts data into table 2

acro
Nm
aB
fiL
2 Ac
aC


ok heres the thing if someone now tries to put data into table 1 tbl2_acro
must exist in table 2. My problem is how can I get it accept the tbl2_acro
typed as eg nM, Nm or NM but still return Nm. As naturally if you type nM
or NM or nm it returns a foreign key violation.   Is this possible from
the dbase level or is it more the front end level? As various users will
have various ways of tying (naturally).

 Does this make sense? :)

Peter Jackson


Responses

pgsql-novice by date

Next:From: David GardnerDate: 2009-01-11 06:19:37
Subject: Re: Foreign Keys
Previous:From: plu 12Date: 2009-01-10 20:17:11
Subject: Adding not null check constaint to list of columns

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