postgresql/src/include/utils
Tom Lane 742fd06d98 Fix up ruleutils.c for CTE features. The main problem was that
get_name_for_var_field didn't have enough context to interpret a reference to
a CTE query's output.  Fixing this requires separate hacks for the regular
deparse case (pg_get_ruledef) and for the EXPLAIN case, since the available
context information is quite different.  It's pretty nearly parallel to the
existing code for SUBQUERY RTEs, though.  Also, add code to make sure we
qualify a relation name that matches a CTE name; else the CTE will mistakenly
capture the reference when reloading the rule.

In passing, fix a pre-existing problem with get_name_for_var_field not working
on variables in targetlists of SubqueryScan plan nodes.  Although latent all
along, this wasn't a problem until we made EXPLAIN VERBOSE try to print
targetlists.  To do this, refactor the deparse_context_for_plan API so that
the special case for SubqueryScan is all on ruleutils.c's side.
2008-10-06 20:29:38 +00:00
..
acl.h Create a separate grantable privilege for TRUNCATE, rather than having it be 2008-09-08 00:47:41 +00:00
array.h Add array_fill() to create arrays initialized with a value. 2008-07-16 00:48:54 +00:00
ascii.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
builtins.h Fix up ruleutils.c for CTE features. The main problem was that 2008-10-06 20:29:38 +00:00
cash.h Add $PostgreSQL$ markers to a lot of files that were missing them. 2008-05-17 01:28:26 +00:00
catcache.h Improve our #include situation by moving pointer types away from the 2008-06-19 00:46:06 +00:00
combocid.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
date.h Get rid of a bunch of #ifdef HAVE_INT64_TIMESTAMP conditionals by inventing 2008-03-21 01:31:43 +00:00
datetime.h Make our parsing of INTERVAL literals spec-compliant (or at least a heck of 2008-09-10 18:29:41 +00:00
datum.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
dynahash.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
dynamic_loader.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
elog.h Add a bunch of new error location reports to parse-analysis error messages. 2008-09-01 20:42:46 +00:00
errcodes.h Implement SQL-standard WITH clauses, including WITH RECURSIVE. 2008-10-04 21:56:55 +00:00
flatfiles.h Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
fmgrtab.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
formatting.h Const-ify the arguments of str_tolower() and friends to suppress compile 2008-07-12 00:44:38 +00:00
geo_decls.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
guc.h Use guc.c's parse_int() instead of pg_atoi() to parse fillfactor in 2008-07-23 17:29:53 +00:00
guc_tables.h Rewrite the FSM. Instead of relying on a fixed-size shared memory segment, the 2008-09-30 10:52:14 +00:00
help_config.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
hsearch.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
inet.h Change the declaration of struct varlena so that the length word is 2008-02-23 19:11:45 +00:00
int8.h Clean up some problems with redundant cross-type arithmetic operators. Add 2008-06-17 19:10:56 +00:00
inval.h Improve the plan cache invalidation mechanism to make it invalidate plans 2008-09-09 18:58:09 +00:00
logtape.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
lsyscache.h Add hooks to let plugins override the planner's lookups in pg_statistic. 2008-09-28 19:51:40 +00:00
memutils.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
nabstime.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
numeric.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
palloc.h If pnstrdup is going to be promoted to a generally available function, 2008-06-28 16:45:22 +00:00
pg_crc.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
pg_locale.h Make LC_COLLATE and LC_CTYPE database-level settings. Collation and 2008-09-23 09:20:39 +00:00
pg_lzcompress.h This patch addresses some issues in TOAST compression strategy that 2008-03-07 23:20:21 +00:00
pg_rusage.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
plancache.h Fix caching of foreign-key-checking queries so that when a replan is needed, 2008-09-15 23:37:40 +00:00
portal.h Adjust things so that the query_string of a cached plan and the sourceText of 2008-07-18 20:26:06 +00:00
ps_status.h Add GUC update_process_title to control whether 'ps' display is updated 2006-06-27 22:16:44 +00:00
rel.h Rewrite the FSM. Instead of relying on a fixed-size shared memory segment, the 2008-09-30 10:52:14 +00:00
relcache.h Improve our #include situation by moving pointer types away from the 2008-06-19 00:46:06 +00:00
resowner.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
selfuncs.h Add hooks to let plugins override the planner's lookups in pg_statistic. 2008-09-28 19:51:40 +00:00
snapmgr.h Improve snapshot manager by keeping explicit track of snapshots. 2008-05-12 20:02:02 +00:00
snapshot.h Improve snapshot manager by keeping explicit track of snapshots. 2008-05-12 20:02:02 +00:00
syscache.h Convert the list of syscache names from a series of #define's into an enum, 2008-05-07 01:04:49 +00:00
timestamp.h Add timestamp and timestamptz versions of generate_series(). 2008-05-04 23:19:24 +00:00
tqual.h Move the HTSU_Result enum definition into snapshot.h, to avoid including 2008-03-26 21:10:39 +00:00
tuplesort.h Improve our #include situation by moving pointer types away from the 2008-06-19 00:46:06 +00:00
tuplestore.h Implement SQL-standard WITH clauses, including WITH RECURSIVE. 2008-10-04 21:56:55 +00:00
typcache.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
tzparser.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
uuid.h Fix some missed copyright updates. 2008-01-01 20:31:21 +00:00
varbit.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
xml.h Turn xmlbinary and xmloption GUC variables into enumsTurn xmlbinary and 2008-04-04 08:33:15 +00:00