Re: plpgsql constraint checked data fails to restore - Mailing list pgsql-general

From Lee Harr
Subject Re: plpgsql constraint checked data fails to restore
Date
Msg-id BAY7-F72254E90AE237F27FF3EBB1E90@phx.gbl
Whole thread Raw
In response to plpgsql constraint checked data fails to restore  ("Lee Harr" <missive@hotmail.com>)
Responses Re: plpgsql constraint checked data fails to restore
List pgsql-general
>>Some of the data required by the check function
>>is being restored after the data being checked
>>by the function and so it all fails the constraint.
>
>Are you saying that the check function perform queries against other
>data?  That might not be a good idea -- consider what happens if
>the data changes: would changes invalidate records that had previously
>passed the check but that wouldn't pass now if they were checked
>again?

You ask some great questions. Thanks.

I think maybe I just got a little constraint-happy. The way I have
it, there is definitely a possibility for the other data to change
out from under the constraint. That can't be good.

Right now, I don't really see another way to check what I wanted
to check, so I am just going to remove the constraint.

When I get a few minutes, I will post my simplified example and
maybe someone will have a good idea.

Thanks again.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


pgsql-general by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: OIDS
Next
From: Együd Csaba
Date:
Subject: Re: Making the DB secure