mirror of
https://github.com/postgres/postgres.git
synced 2026-04-15 22:10:45 -04:00
Fix bogus range_table_mutator() logic for RangeTblEntry.tablesample.
Must make a copy of the TableSampleClause node; the previous coding modified the input data structure in-place. Petr Jelinek
This commit is contained in:
parent
ed16f73c57
commit
be87143fe9
1 changed files with 7 additions and 3 deletions
|
|
@ -2870,10 +2870,14 @@ range_table_mutator(List *rtable,
|
|||
case RTE_RELATION:
|
||||
if (rte->tablesample)
|
||||
{
|
||||
MUTATE(rte->tablesample->args, rte->tablesample->args,
|
||||
CHECKFLATCOPY(newrte->tablesample, rte->tablesample,
|
||||
TableSampleClause);
|
||||
MUTATE(newrte->tablesample->args,
|
||||
newrte->tablesample->args,
|
||||
List *);
|
||||
MUTATE(rte->tablesample->repeatable,
|
||||
rte->tablesample->repeatable, Node *);
|
||||
MUTATE(newrte->tablesample->repeatable,
|
||||
newrte->tablesample->repeatable,
|
||||
Node *);
|
||||
}
|
||||
break;
|
||||
case RTE_CTE:
|
||||
|
|
|
|||
Loading…
Reference in a new issue