#4206 closed patch (fixed)
"getrelid" removed in PostgreSQL v12devel
Reported by: | Laurenz Albe | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.0.0 |
Component: | build | Version: | master |
Keywords: | getrelid | Cc: |
Description
The attached patch is required to build with PostgreSQL v12devel since commit d73f4c74dd34b19c19839f7ae09fb96442728509 removed getrelid
.
Attachments (1)
Change History (8)
by , 6 years ago
Attachment: | getrelid-is-gone.patch added |
---|
comment:1 by , 6 years ago
Keywords: | getrelid added |
---|
comment:2 by , 6 years ago
I suggest you keep the getrelid and use a macro which either calls "getrelid" or "rt_fetch" based on what's available based on PG_VERSION_NUM
comment:3 by , 6 years ago
I only checked back to PostgreSQL 9.1, but getrelid
has always been a macro:
/* * getrelid * * Given the range index of a relation, return the corresponding * relation OID. Note that InvalidOid will be returned if the * RTE is for a non-relation-type RTE. */ #define getrelid(rangeindex,rangetable) \ (rt_fetch(rangeindex, rangetable)->relid)
So I think it is safe and actually an improvement to call rt_fetch
directly.
comment:7 by , 6 years ago
Note:
See TracTickets
for help on using tickets.
Patch to fix building in the absence of "getrelid"