postgresql/src/test/regress/expected
Tom Lane 46c508fbcf Fix PARAM_EXEC assignment mechanism to be safe in the presence of WITH.
The planner previously assumed that parameter Vars having the same absolute
query level, varno, and varattno could safely be assigned the same runtime
PARAM_EXEC slot, even though they might be different Vars appearing in
different subqueries.  This was (probably) safe before the introduction of
CTEs, but the lazy-evalution mechanism used for CTEs means that a CTE can
be executed during execution of some other subquery, causing the lifespan
of Params at the same syntactic nesting level as the CTE to overlap with
use of the same slots inside the CTE.  In 9.1 we created additional hazards
by using the same parameter-assignment technology for nestloop inner scan
parameters, but it was broken before that, as illustrated by the added
regression test.

To fix, restructure the planner's management of PlannerParamItems so that
items having different semantic lifespans are kept rigorously separated.
This will probably result in complex queries using more runtime PARAM_EXEC
slots than before, but the slots are cheap enough that this hardly matters.
Also, stop generating PlannerParamItems containing Params for subquery
outputs: all we really need to do is reserve the PARAM_EXEC slot number,
and that now only takes incrementing a counter.  The planning code is
simpler and probably faster than before, as well as being more correct.

Per report from Vik Reykja.

These changes will mostly also need to be made in the back branches, but
I'm going to hold off on that until after 9.2.0 wraps.
2012-09-05 12:55:01 -04:00
..
.gitignore Add a SECURITY LABEL command. 2010-09-27 20:55:27 -04:00
abstime.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
advisory_lock.out Add transaction-level advisory locks. 2011-02-18 14:05:12 +09:00
aggregates.out Centralize the logic for detecting misplaced aggregates, window funcs, etc. 2012-08-10 11:36:15 -04:00
alter_table.out Change syntax of new CHECK NO INHERIT constraints 2012-07-24 16:01:32 -04:00
arrays.out Add array_remove() and array_replace() functions. 2012-07-11 13:59:35 -04:00
bit.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
bitmapops.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
boolean.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
box.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
btree_index.out
case.out
char_1.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
char_2.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
char.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
circle.out
cluster.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
collate.linux.utf8.out Update expected/collate.linux.utf8.out for recent plpgsql changes. 2012-02-18 18:08:02 -05:00
collate.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
combocid.out
comments.out
conversion.out
copy2.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
copyselect.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
create_aggregate.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
create_cast.out Improve psql's tabular display of wrapped-around data by inserting markers 2009-11-22 05:20:41 +00:00
create_function_3.out Remove whitespace from end of lines 2012-05-15 22:19:41 +03:00
create_index.out Fix DROP INDEX CONCURRENTLY IF EXISTS. 2012-08-27 12:45:43 -04:00
create_misc.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
create_operator.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
create_table_like.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
create_table.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
create_type.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
create_view.out Add a security_barrier option for views. 2011-12-22 16:16:31 -05:00
date.out
delete.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
dependency.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
domain.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
drop_if_exists.out Fix DROP OPERATOR FAMILY IF EXISTS. 2011-10-21 09:12:23 -04:00
enum.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
errors.out Be more clear when a new column name collides with a system column name. 2012-01-26 12:44:30 -05:00
euc_cn.out
euc_jp.out
euc_kr.out
euc_tw.out
event_trigger.out Make new event trigger facility actually do something. 2012-07-20 11:39:01 -04:00
float4-exp-three-digits.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
float4.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
float8-exp-three-digits-win32.out Revert "Add some regression test cases for denormalized float8 input." 2012-02-04 15:52:09 -05:00
float8-small-is-zero_1.out Revert "Add some regression test cases for denormalized float8 input." 2012-02-04 15:52:09 -05:00
float8-small-is-zero.out Revert "Add some regression test cases for denormalized float8 input." 2012-02-04 15:52:09 -05:00
float8.out Revert "Add some regression test cases for denormalized float8 input." 2012-02-04 15:52:09 -05:00
foreign_data.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
foreign_key.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
functional_deps.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
geometry_1.out
geometry_2.out
geometry.out
guc.out Silently ignore any nonexistent schemas that are listed in search_path. 2012-04-11 12:02:50 -04:00
hash_index.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
horology.out On second thought, we'd better just drop these tests altogether. 2011-11-06 20:12:20 -05:00
hs_standby_allowed.out Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
hs_standby_check.out Allow read only connections during recovery, known as Hot Standby. 2009-12-19 01:32:45 +00:00
hs_standby_disallowed.out Update standbycheck test output with new ERROR message changes. No changes 2010-05-02 12:28:43 +00:00
hs_standby_functions.out Update standbycheck test output with new ERROR message changes. No changes 2010-05-02 12:28:43 +00:00
inet.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
inherit.out Change syntax of new CHECK NO INHERIT constraints 2012-07-24 16:01:32 -04:00
insert.out When a row fails a not-null constraint, show row's contents in errdetail. 2011-11-29 18:29:18 -05:00
int2.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
int4.out Attempt to fix breakage caused by signed integer conversion patch. 2010-11-20 01:09:26 -05:00
int8-exp-three-digits.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
int8.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
interval.out Fix bugs with parsing signed hh:mm and hh:mm:ss fields in interval input. 2012-08-03 17:40:43 -04:00
join.out Drop cheap-startup-cost paths during add_path() if we don't need them. 2012-09-01 18:16:24 -04:00
json.out Revisit error message details for JSON input parsing. 2012-06-13 19:43:35 -04:00
limit.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
lseg.out
macaddr.out Add bitwise AND, OR, and NOT operators for macaddr data type. 2012-01-19 15:25:14 -05:00
money.out Add casts from int4 and int8 to numeric. 2011-04-05 09:35:43 -04:00
mule_internal.out
name.out
namespace.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
numeric_big.out
numeric.out Add some enumeration commas, for consistency 2012-02-24 11:04:45 +02:00
numerology_1.out
numerology.out
oid.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
oidjoins.out Update oidjoins regression test to match git HEAD. 2011-11-14 20:28:38 -05:00
opr_sanity.out Add SP-GiST support for range types. 2012-08-16 14:30:45 +03:00
path.out
plancache.out Code review for plpgsql fn_signature patch. 2012-02-01 02:14:37 -05:00
plpgsql.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
point.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
polygon.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
polymorphism.out Make DROP FUNCTION hint more informative. 2012-06-26 13:33:23 -04:00
portals_p2.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
portals.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
prepare.out Improve psql's tabular display of wrapped-around data by inserting markers 2009-11-22 05:20:41 +00:00
prepared_xacts_1.out Fix a bug with SSI and prepared transactions: 2011-07-07 18:12:15 +03:00
prepared_xacts.out Adjust regression tests for error message change 2011-08-15 17:27:10 +03:00
privileges.out Fix cascading privilege revoke to notice when privileges are still held. 2012-08-23 17:25:10 -04:00
random.out
rangefuncs.out Implement SQL-standard LATERAL subqueries. 2012-08-07 19:02:54 -04:00
rangetypes.out Add SP-GiST support for range types. 2012-08-16 14:30:45 +03:00
regex.out Re-implement extraction of fixed prefixes from regular expressions. 2012-07-10 14:54:37 -04:00
reltime.out
returning.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
rowtypes.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
rules.out Fix typo in comment. 2012-08-19 22:56:17 -04:00
sanity_check.out Add SP-GiST support for range types. 2012-08-16 14:30:45 +03:00
select_distinct_on.out
select_distinct.out
select_having_1.out
select_having_2.out
select_having.out
select_implicit_1.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
select_implicit_2.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
select_implicit.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
select_into.out Restructure SELECT INTO's parsetree representation into CreateTableAsStmt. 2012-03-19 21:38:12 -04:00
select_views_1.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
select_views.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
select.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
sequence_1.out Fix longstanding crash-safety bug with newly-created-or-reset sequences. 2012-07-25 17:42:23 -04:00
sequence.out Fix longstanding crash-safety bug with newly-created-or-reset sequences. 2012-07-25 17:42:23 -04:00
sql_ascii.out
stats.out Prevent index-only scans in stats regression test. 2011-10-08 23:45:58 -04:00
strings.out Rewrite LIKE's %-followed-by-_ optimization so it really works (this time 2010-05-28 17:35:23 +00:00
subselect.out Fix whole-row Var evaluation to cope with resjunk columns (again). 2012-07-20 13:10:58 -04:00
temp.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
text.out Message style improvements 2011-07-08 07:37:04 +03:00
time.out
timestamp.out Fix to_char(), to_date(), and to_timestamp() to handle negative/BC 2012-08-07 13:34:44 -04:00
timestamptz.out Fix to_char(), to_date(), and to_timestamp() to handle negative/BC 2012-08-07 13:34:44 -04:00
timetz.out
tinterval.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
transactions.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
triggers.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
truncate.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
tsdicts.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
tsearch.out Fix gincostestimate to handle ScalarArrayOpExpr reasonably. 2011-12-20 19:57:34 -05:00
tstypes.out
txid.out
type_sanity.out Collect and use element-frequency statistics for arrays. 2012-03-03 20:20:57 -05:00
typed_table.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
union.out Implement SQL-standard LATERAL subqueries. 2012-08-07 19:02:54 -04:00
update.out Regression tests for TOAST. 2011-04-25 09:48:10 -04:00
uuid.out
vacuum.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
varchar_1.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
varchar_2.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
varchar.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
window.out Centralize the logic for detecting misplaced aggregates, window funcs, etc. 2012-08-10 11:36:15 -04:00
with.out Fix PARAM_EXEC assignment mechanism to be safe in the presence of WITH. 2012-09-05 12:55:01 -04:00
without_oid.out
xml_1.out Prevent access to external files/URLs via XML entity references. 2012-08-14 18:31:16 -04:00
xml.out Prevent access to external files/URLs via XML entity references. 2012-08-14 18:31:16 -04:00
xmlmap_1.out
xmlmap.out Avoid extra newlines in XML mapping in table forest mode 2012-07-12 23:52:50 +03:00