Thanks to you all for all your help and comments.
I finally ended up creating a trigger to check the constraints. This has the
added benefit that more than one constraint can be checked in the one
trigger.
As to whether it is the best model or not for what I want to do. This
question is more diffi
Andrew Maclean wrote:
> I got no answer so I am trying again.
>
> In a nutshell, if I have a recrusive relationship as outlined below, how
> do I implement a rule for the adjustments table that prevents the entry
> of an Id into the Ref column if the id exists in the Id column and vice
> versa?
>
Michael Glaesemann wrote:
INSERT INTO accounts_receivable_receipts (accounts_receivable_id,
receipt_id)
VALUES (2, 1), (4, 3), (6, 1), (5, 3);
I have not done much accounting-style design, and I don't think this is
really the best way to set these up (for example, I think it's a bit odd
to ma
[Removing pgsql-novice. Please don't cross-post. Choose one list or
another at a time. ]
On Jun 19, 2007, at 23:04 , Andrew Maclean wrote:
I got no answer so I am trying again.
In a nutshell, if I have a recrusive relationship as outlined
below, how do I implement a rule for the adjustment