Skip to content

Commit

Permalink
Vendor RELKIND_HAS_TABLE_AM for PG14
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-- committed Dec 18, 2024
1 parent eed0def commit 1302610
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/pg/relations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ namespace pgduckdb {

#undef RelationGetDescr

#if PG_VERSION_NUM < 150000
/*
* Relation kinds with a table access method (rd_tableam). Although sequences
* use the heap table AM, they are enough of a special case in most uses that
* they are not included here. Likewise, partitioned tables can have an access
* method defined so that their partitions can inherit it, but they do not set
* rd_tableam; hence, this is handled specially outside of this macro.
*/
#define RELKIND_HAS_TABLE_AM(relkind) \
((relkind) == RELKIND_RELATION || \
(relkind) == RELKIND_TOASTVALUE || \
(relkind) == RELKIND_MATVIEW)
#endif

TupleDesc
RelationGetDescr(Relation rel) {
return rel->rd_att;
Expand Down

0 comments on commit 1302610

Please sign in to comment.