Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group