<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Constraints In PostgreSQL</title>
	<link>http://blog.charcoalphile.com/2008/03/28/constraints-in-postgresql/</link>
	<description>On Databases, Recovery, Tech</description>
	<pubDate>Thu, 09 Sep 2010 08:35:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Dan</title>
		<link>http://blog.charcoalphile.com/2008/03/28/constraints-in-postgresql/#comment-400</link>
		<author>Dan</author>
		<pubDate>Thu, 08 May 2008 17:52:08 +0000</pubDate>
		<guid>http://blog.charcoalphile.com/2008/03/28/constraints-in-postgresql/#comment-400</guid>
		<description>&lt;p&gt;This would be of great help.&lt;/p&gt;
&lt;p&gt;Problem:&lt;br /&gt;
I am trying to create a foreign key of one column (Table A) to reference another table which has a primary key of two columns (Table B). The constraint I want to to set is to make sure that every value in my column of Table A corresponds to a such a value in Table B. However, there are duplicate values in Table B's column. Postgres won't let you do select statements in constraint statements. Is there a strategy of workaround to this problem that wouldn't require me to change the schema of Table B?&lt;/p&gt;
&lt;p&gt;Please email me at ___.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This would be of great help.</p>
<p>Problem:<br />
I am trying to create a foreign key of one column (Table A) to reference another table which has a primary key of two columns (Table B). The constraint I want to to set is to make sure that every value in my column of Table A corresponds to a such a value in Table B. However, there are duplicate values in Table B&#8217;s column. Postgres won&#8217;t let you do select statements in constraint statements. Is there a strategy of workaround to this problem that wouldn&#8217;t require me to change the schema of Table B?</p>
<p>Please email me at ___.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
