postgresql/src
Tom Lane ac355d558e Move most of the error checking for foreign-key constraints out of
parse analysis and into the execution code (in tablecmds.c).  This
eliminates a lot of unreasonably complex code that needed to have two
or more execution paths in case it was dealing with a not-yet-created
table column vs. an already-existing one.  The execution code is always
dealing with already-created tables and so needs only one case.  This
also eliminates some potential race conditions (the table wasn't locked
between parse analysis and execution), makes it easy to fix the gripe
about wrong referenced-column names generating a misleading error message,
and lets us easily add a dependency from the foreign-key constraint to
the unique index that it requires the referenced table to have.  (Cf.
complaint from Kris Jurka 12-Sep-2002 on pgsql-bugs.)

Also, third try at building a deletion mechanism that is not sensitive
to the order in which pg_depend entries are visited.  Adding the above-
mentioned dependency exposed the folly of what dependency.c had been
doing: it failed for cases where B depends on C while both auto-depend
on A.  Dropping A should succeed in this case, but was failing if C
happened to be visited before B.  It appears the only solution is two
separate walks over the dependency tree.
2002-09-22 00:37:09 +00:00
..
backend Move most of the error checking for foreign-key constraints out of 2002-09-22 00:37:09 +00:00
bin Extend pg_cast castimplicit column to a three-way value; this allows us 2002-09-18 21:35:25 +00:00
corba
data
include Move most of the error checking for foreign-key constraints out of 2002-09-22 00:37:09 +00:00
interfaces Translation updates 2002-09-14 13:46:24 +00:00
makefiles Assorted fixes for Cygwin: 2002-09-05 18:28:46 +00:00
pl Provide an upgrade strategy for dump files containing functions declared 2002-09-21 18:39:26 +00:00
port pgindent run. 2002-09-04 20:31:48 +00:00
template Assorted fixes for Cygwin: 2002-09-05 18:28:46 +00:00
test Move most of the error checking for foreign-key constraints out of 2002-09-22 00:37:09 +00:00
tools Update symbols for 7.3. 2002-09-04 19:11:06 +00:00
tutorial Assorted fixes for Cygwin: 2002-09-05 18:28:46 +00:00
utils
DEVELOPERS
Makefile Assorted fixes for Cygwin: 2002-09-05 18:28:46 +00:00
Makefile.global.in Remove leftovers from subproject removals. Fixes for Python and Kerberos 2002-09-04 22:54:18 +00:00
Makefile.shlib Assorted fixes for Cygwin: 2002-09-05 18:28:46 +00:00
nls-global.mk Avoid shell syntax error if list of languages is empty. 2002-09-02 22:19:42 +00:00
win32.mak Remove all traces of multibyte and locale options. Clean up comments 2002-09-03 21:45:44 +00:00