PL/Proxy on PostgreSQL 12 ?In my yesterday blog post I reported some stupid thougth about compiling PL/Proxy against PostgreSQL 12.
I was too stupid to hit the removal of
HeapTupleGetOid(as of commit 578b229718e8f15fa779e20f086c4b6bb3776106 ), and after having read the commit comment with more accuracy, I found how to fix the code (at least I hope so!).
Essentially, wherever I found usage of
HeapTupleGetOidI placed a preprocessor macro to extract the
Form_pg_structure and use the normal column
oidinstead, something like:
#if PG_VERSION_NUM < 12000 Oid namespaceId = HeapTupleGetOid(tup); #else Form_pg_namespace form = (Form_pg_namespace) GETSTRUCT(tup); Oid namespaceId = form->oid; #endif
I strongly advise to not use this in production, at least until someone of the PL/Proxy authors have a look at the code! However the tests pass on PostgreSQL 12beta2 on Linux.
You can find the pull request that also includes my previous pull request to make PL/Proxy work against PostgreSQL11 and FreeBSD.
I hope it can help pushing a new release of this tool.