Re: plpgsql constraint checked data fails to restore

From: "Lee Harr" <missive(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: plpgsql constraint checked data fails to restore
Date: 2005-06-20 17:23:18
Message-ID: BAY7-F72254E90AE237F27FF3EBB1E90@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

>>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/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Együd Csaba 2005-06-20 17:32:12 Re: Making the DB secure
Previous Message Tino Wildenhain 2005-06-20 16:49:41 Re: OIDS

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2005-06-20 17:35:24 Re: query plan ignoring check constraints
Previous Message Dave Page 2005-06-20 15:34:40 Re: [PATCHES] default database creation with initdb