Include ifdefs for pg12 API changes, update local_shard_executiuon test to avoid CTE inlining

pull/3020/head
Philip Dubé 2019-09-23 20:21:47 +00:00
parent ec9fee1c92
commit 06faba91c0
5 changed files with 10 additions and 3 deletions

View File

@ -19,6 +19,9 @@
#include "miscadmin.h" #include "miscadmin.h"
#include "funcapi.h" #include "funcapi.h"
#if PG_VERSION_NUM >= 120000
#include "access/genam.h"
#endif
#include "access/htup_details.h" #include "access/htup_details.h"
#include "access/xact.h" #include "access/xact.h"
#include "catalog/namespace.h" #include "catalog/namespace.h"

View File

@ -1176,7 +1176,11 @@ BlessRecordExpression(Expr *expr)
ListCell *argCell = NULL; ListCell *argCell = NULL;
int currentResno = 1; int currentResno = 1;
#if PG_VERSION_NUM >= 120000
rowTupleDesc = CreateTemplateTupleDesc(list_length(rowExpr->args));
#else
rowTupleDesc = CreateTemplateTupleDesc(list_length(rowExpr->args), false); rowTupleDesc = CreateTemplateTupleDesc(list_length(rowExpr->args), false);
#endif
foreach(argCell, rowExpr->args) foreach(argCell, rowExpr->args)
{ {

View File

@ -705,7 +705,7 @@ SELECT
FROM FROM
distributed_table, all_data distributed_table, all_data
WHERE WHERE
distributed_table.key = all_data.key AND distributed_table.key = 1; distributed_table.key = all_data.key AND distributed_table.key = 1 AND EXISTS (SELECT * FROM all_data);
count count
------- -------
1 1

View File

@ -691,7 +691,7 @@ SELECT
FROM FROM
distributed_table, all_data distributed_table, all_data
WHERE WHERE
distributed_table.key = all_data.key AND distributed_table.key = 1; distributed_table.key = all_data.key AND distributed_table.key = 1 AND EXISTS (SELECT * FROM all_data);
count count
------- -------
1 1

View File

@ -425,7 +425,7 @@ SELECT
FROM FROM
distributed_table, all_data distributed_table, all_data
WHERE WHERE
distributed_table.key = all_data.key AND distributed_table.key = 1; distributed_table.key = all_data.key AND distributed_table.key = 1 AND EXISTS (SELECT * FROM all_data);
-- get ready for the next commands -- get ready for the next commands