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

Re: foreign key constraint not working when index tablespace

From: Joel Krajden <joelk(at)cs(dot)concordia(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: foreign key constraint not working when index tablespace
Date: 2005-03-30 20:11:53
Message-ID: 424B0809.40802@cs.concordia.ca (view raw or flat)
Thread:
Lists: pgsql-bugs
I don't think I am crazy and the user who showed me the problem exists - but 
damn it neither he or I cannot duplicate the problem. The only thing that 
changed is each of us has logged out of our session and logged back in.


The only thing that could have happened is that sometime in the past the 
schema search path changed after the user logged in. There was no other table 
with a duplicate name in another schema.


Thanks for doing the sanity check.

Joel

Tom Lane wrote:
> Joel Krajden <joelk(at)cs(dot)concordia(dot)ca> writes:
> 
>>But if I create the tables as a mortal user or create them as postgres
>>but in the schema of user joelk and grant all to user joelk, I can
>>insert data without the foreign key constraint being respected. Now if
>>I drop the foreign key constraint and recreate it with a schema prefix
>>in the references section, the constarint works fine.
> 
> 
> This is even harder to believe than the first report.  Could we see a
> complete, self-contained test case?  A SQL script that demonstrates the
> problem from a standing start in an empty database is what I have in mind.
> 
> (What I suspect is that you have multiple similarly-named tables in
> different schemas and are getting confused by that...)
> 
> 			regards, tom lane


-- 
| Joel Krajden              | Rm: LB-915,  Tel: 514 848-2424 3052         |
|                           | Fax: 514 848-2830                           |
| Senior Systems Analyst    | Email: joelk(at)cs(dot)concordia(dot)ca                |
| Engineering & Computer Sc.| http://www.cs.concordia.ca/~staffcs/joelk   |
| Concordia University      |   Remember it's a circus and the clowns     |
| Montreal, Canada          |   are supposed to make you laugh, not cry.  |

In response to

pgsql-bugs by date

Next:From: CaTDate: 2005-03-31 00:07:56
Subject: BUG #1571: Cannot grant execute functions to non-superusers
Previous:From: Neil ConwayDate: 2005-03-30 15:05:11
Subject: Re: BUG #1567: can't hide password with pg_autovacuum

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