mirror of https://github.com/citusdata/citus.git
Refactor identity sequence retrieval in insert select planner for compatibility
parent
934d41881b
commit
306eb869b2
|
@ -10,8 +10,10 @@
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
|
#include "catalog/dependency.h"
|
||||||
#include "catalog/pg_class.h"
|
#include "catalog/pg_class.h"
|
||||||
#include "catalog/pg_type.h"
|
#include "catalog/pg_type.h"
|
||||||
|
#include "commands/sequence.h"
|
||||||
#include "nodes/makefuncs.h"
|
#include "nodes/makefuncs.h"
|
||||||
#include "nodes/nodeFuncs.h"
|
#include "nodes/nodeFuncs.h"
|
||||||
#include "nodes/parsenodes.h"
|
#include "nodes/parsenodes.h"
|
||||||
|
@ -1128,7 +1130,7 @@ ReorderInsertSelectTargetLists(Query *originalQuery, RangeTblEntry *insertRte,
|
||||||
oldInsertTargetEntry->resname);
|
oldInsertTargetEntry->resname);
|
||||||
bool missingOk = false;
|
bool missingOk = false;
|
||||||
|
|
||||||
Oid seqOid = getIdentitySequence(targetRel, attrNum, missingOk);
|
Oid seqOid = getIdentitySequence(identitySequenceRelation_compat(targetRel), attrNum, missingOk);
|
||||||
if (!OidIsValid(seqOid))
|
if (!OidIsValid(seqOid))
|
||||||
{
|
{
|
||||||
table_close(targetRel, AccessShareLock);
|
table_close(targetRel, AccessShareLock);
|
||||||
|
|
Loading…
Reference in New Issue