Re: Best way to restrict detail rows?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Richard Broersma" <richard(dot)broersma(at)gmail(dot)com>
Cc: "Christopher Maier" <maier(at)med(dot)unc(dot)edu>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Best way to restrict detail rows?
Date: 2008-12-08 21:34:54
Message-ID: dcc563d10812081334y7b99268dk777fc869286213bb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, Dec 8, 2008 at 2:31 PM, Richard Broersma
<richard(dot)broersma(at)gmail(dot)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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2008-12-09 09:46:07 A DISTINCT problem removing duplicates
Previous Message Richard Broersma 2008-12-08 21:31:43 Re: Best way to restrict detail rows?