Re: Table inheritance, unique constraints and foreign key problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: "Jacob Rief" <jacob(dot)rief(at)gmx(dot)at>, hackers(at)postgresql(dot)org
Subject: Re: Table inheritance, unique constraints and foreign key problem
Date: 2007-11-27 02:30:05
Message-ID: 8971.1196130605@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> I'm a bit puzzled myself why this affects SELECT FOR UPDATE/SHARE but not
> straight UPDATES and DELETES.

In straight UPDATE/DELETE we have enough structure in the query to know
how to associate each tuple returned to the executor top level with
exactly one tuple in exactly one target table (which is where to apply
the tuple lock operation). We don't have that much structure in general
SELECT --- for example, what to do with null-filled rows in a LEFT JOIN,
or cases where one row gives rise to more than one joined row, or
aggregation or UNION? Some of these cases can probably be rejected as
unsupportable, but it'll still take a lot of work.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2007-11-27 02:42:39 Re: [PATCHES] Fixes for MONEY type using locale
Previous Message Tom Lane 2007-11-27 02:19:48 Re: [PATCHES] Fixes for MONEY type using locale