Re: Best way to restrict detail rows? - Mailing list pgsql-sql

From Scott Marlowe
Subject Re: Best way to restrict detail rows?
Date
Msg-id dcc563d10812081334y7b99268dk777fc869286213bb@mail.gmail.com
Whole thread Raw
In response to Re: Best way to restrict detail rows?  ("Richard Broersma" <richard.broersma@gmail.com>)
List pgsql-sql
On Mon, Dec 8, 2008 at 2:31 PM, Richard Broersma
<richard.broersma@gmail.com> wrote:
> One Idea that popped into my head that may-or-may-not work would be to
> add a constraint trigger that checks if all of the detail records have
> the same xmin as the order table record.

Yes, it's not as simple as I first thought when I read it.

I'd look at using a udf that used a sec definer that only it had to do
the row adds and do everything at once, inserting to both tables at
the time of the creation of the order.


pgsql-sql by date:

Previous
From: "Richard Broersma"
Date:
Subject: Re: Best way to restrict detail rows?
Next
From: Richard Huxton
Date:
Subject: A DISTINCT problem removing duplicates