postgresql/src/backend/commands
Tom Lane 2c535bfe81 Fix incorrect optimization of foreign-key checks. When an UPDATE on the
referencing table does not change the tuple's FK column(s), we don't bother
to check the PK table since the constraint was presumably already valid.
However, the check is still necessary if the tuple was inserted by our own
transaction, since in that case the INSERT trigger will conclude it need not
make the check (since its version of the tuple has been deleted).  We got this
right for simple cases, but not when the insert and update are in different
subtransactions of the current top-level transaction; in such cases the FK
check would never be made at all.  (Hence, problem dates back to 8.0 when
subtransactions were added --- it's actually the subtransaction version of a
bug fixed in 7.3.5.)  Fix, and add regression test cases.  Report and fix by
Affan Salman.
2007-07-17 17:45:28 +00:00
..
Makefile Rename the newly-added commands for discarding session state. 2007-04-26 16:13:15 +00:00
aggregatecmds.c Support enum data types. Along the way, use macros for the values of 2007-04-02 03:49:42 +00:00
alter.c Add ALTER VIEW ... RENAME TO, and a RENAME TO clause to ALTER SEQUENCE. 2007-07-03 01:30:37 +00:00
analyze.c Make large sequential scans and VACUUMs work in a limited-size "ring" of 2007-05-30 20:12:03 +00:00
async.c RESET SESSION, plus related new DDL commands. Patch from Marko Kreen, 2007-04-12 06:53:49 +00:00
cluster.c Fix dumb compile error in the last patch. 2007-05-19 01:02:34 +00:00
comment.c Wording cleanup for error messages. Also change can't -> cannot. 2007-02-01 19:10:30 +00:00
conversioncmds.c Fix up foreign-key mechanism so that there is a sound semantic basis for the 2007-02-14 01:58:58 +00:00
copy.c Minor code cleanup: calling FreeFile() before ereport(ERROR) is not 2007-06-20 02:02:49 +00:00
dbcommands.c Implement "distributed" checkpoints in which the checkpoint I/O is spread 2007-06-28 00:02:40 +00:00
define.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
discard.c Rename the newly-added commands for discarding session state. 2007-04-26 16:13:15 +00:00
explain.c Create hooks to let a loadable plugin monitor (or even replace) the planner 2007-05-25 17:54:25 +00:00
functioncmds.c Support enum data types. Along the way, use macros for the values of 2007-04-02 03:49:42 +00:00
indexcmds.c Implement CREATE TABLE LIKE ... INCLUDING INDEXES. Patch from NikhilS, 2007-07-17 05:02:03 +00:00
lockcmds.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
opclasscmds.c Wording cleanup for error messages. Also change can't -> cannot. 2007-02-01 19:10:30 +00:00
operatorcmds.c Minimal message corrections found by spell checker. 2007-06-02 23:36:35 +00:00
portalcmds.c Modify processing of DECLARE CURSOR and EXPLAIN so that they can resolve the 2007-04-27 22:05:49 +00:00
prepare.c Separate parse-analysis for utility commands out of parser/analyze.c 2007-06-23 22:12:52 +00:00
proclang.c Allow non-superuser database owners to create procedural languages. 2007-03-26 16:58:41 +00:00
schemacmds.c Separate parse-analysis for utility commands out of parser/analyze.c 2007-06-23 22:12:52 +00:00
sequence.c Wording cleanup for error messages. Also change can't -> cannot. 2007-02-01 19:10:30 +00:00
tablecmds.c Implement CREATE TABLE LIKE ... INCLUDING INDEXES. Patch from NikhilS, 2007-07-17 05:02:03 +00:00
tablespace.c Rework temp_tablespaces patch so that temp tablespaces are assigned separately 2007-06-07 19:19:57 +00:00
trigger.c Fix incorrect optimization of foreign-key checks. When an UPDATE on the 2007-07-17 17:45:28 +00:00
typecmds.c CREATE DOMAIN ... DEFAULT NULL failed because gram.y special-cases DEFAULT 2007-06-20 18:15:49 +00:00
user.c Wording cleanup for error messages. Also change can't -> cannot. 2007-02-01 19:10:30 +00:00
vacuum.c Avoid having autovacuum run multiple ANALYZE commands in a single transaction, 2007-06-14 13:53:14 +00:00
vacuumlazy.c Make large sequential scans and VACUUMs work in a limited-size "ring" of 2007-05-30 20:12:03 +00:00
variable.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
view.c Separate parse-analysis for utility commands out of parser/analyze.c 2007-06-23 22:12:52 +00:00