postgresql/src/backend
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
..
access pgindent run. 2002-09-04 20:31:48 +00:00
bootstrap pgindent run. 2002-09-04 20:31:48 +00:00
catalog Move most of the error checking for foreign-key constraints out of 2002-09-22 00:37:09 +00:00
commands Move most of the error checking for foreign-key constraints out of 2002-09-22 00:37:09 +00:00
executor Extend pg_cast castimplicit column to a three-way value; this allows us 2002-09-18 21:35:25 +00:00
lib pgindent run. 2002-09-04 20:31:48 +00:00
libpq Shrink the pg_hba.conf and pg_ident.conf default files and move most of the 2002-09-14 18:35:46 +00:00
main pgindent run. 2002-09-04 20:31:48 +00:00
nodes Extend pg_cast castimplicit column to a three-way value; this allows us 2002-09-18 21:35:25 +00:00
optimizer Extend pg_cast castimplicit column to a three-way value; this allows us 2002-09-18 21:35:25 +00:00
parser Move most of the error checking for foreign-key constraints out of 2002-09-22 00:37:09 +00:00
po Translation updates 2002-09-14 13:46:24 +00:00
port Be careful to include postgres.h *before* any system headers, to ensure 2002-09-05 00:43:07 +00:00
postmaster Fix compilation warning. (Cygwin has char* as second argument of 2002-09-05 18:26:18 +00:00
regex Remove retest Makefile entry because it does not compile. 2002-09-16 16:02:43 +00:00
rewrite Extend pg_cast castimplicit column to a three-way value; this allows us 2002-09-18 21:35:25 +00:00
storage Fix PPC s_lock operations to work correctly on multi-CPU machines. 2002-09-21 00:14:05 +00:00
tcop > I'm not sure why NDirectFileRead/NDirectFileWrite are unused at the 2002-09-20 03:45:08 +00:00
utils Add last-ditch defense against attempts to compile datetime code with 2002-09-21 19:52:41 +00:00
Makefile Assorted fixes for Cygwin: 2002-09-05 18:28:46 +00:00
nls.mk Translation updates 2002-09-14 13:46:24 +00:00