Re: Are circular REFERENCES possible ? - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Are circular REFERENCES possible ?
Date
Msg-id web-98111@davinci.ethosmedia.com
Whole thread Raw
In response to Re: Are circular REFERENCES possible ?  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: Are circular REFERENCES possible ?  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-sql
Jan,
>     All of this is wrong. If the constraints are  defined  to  be
>     INITIALLY  DEFERRED,  all  you  have to do is to wrap all the
>     changes that put the database into a  temporary  inconsistent
>     state  into  a  transaction. What is a good idea and strongly
>     advised anyway.
> 
>     DEFERRED means, that the  consistency  WRT  the  foreign  key
>     constratins  will  be  checked  at COMMIT time instead of the
>     actual statement. So if you

Hmmm... sounds interesting.  Can this be done through functions?  I.E.,
if I put the INSERT/INSERT/UPDATE operation inside a function, does it
automatically wait until the function completes before checking
constraints?

>     Josh, maybe you should buy a newer SQL-bo... :-)
> 
>     Got ya (LOL)!

Zap!  Ouch.  ;-)

> 
>     The point is that we based our implementation of foreign keys
>     on the SQL3 specs. DEFERRED is not in SQL-92 AFAIK.
> 

Know a good SQL3 book?  I bought O'Reilly's SQL In A Nutshell for that,
but the book has numerous omissions and a few mistakes.

-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


pgsql-sql by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Are circular REFERENCES possible ?
Next
From: "Josh Berkus"
Date:
Subject: Name Alike Challenge