Skip to content

Commit b5ffdc6

Browse files
author
Yuwei Xiao
committed
adapt pg18
1 parent 936cc27 commit b5ffdc6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pgduckdb_external_tables.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ static std::unordered_set<Oid> loaded_external_tables;
8181
*/
8282
static inline SysScanDesc
8383
BeginExternalTablesScan(Relation external_rel, Oid relid, Oid *index_oid_out) {
84+
#if PG_VERSION_NUM >= 180000
85+
Oid index_oid = RelationGetPrimaryKeyIndex(external_rel, false);
86+
#else
8487
Oid index_oid = RelationGetPrimaryKeyIndex(external_rel);
88+
#endif
8589
bool has_index = OidIsValid(index_oid);
8690

8791
ScanKeyData skey;

0 commit comments

Comments
 (0)