Skip to content

include more headers - #2377

Open
usamoi wants to merge 3 commits into
pgcentralfoundation:developfrom
usamoi:headers
Open

include more headers#2377
usamoi wants to merge 3 commits into
pgcentralfoundation:developfrom
usamoi:headers

Conversation

@usamoi

@usamoi usamoi commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

This PR makes pgrx include more headers. The ultimate goal is to include all headers to avoid the awkward situation where pgrx is missing the header files required by extensions.

Now all ./pgrx-pg-sys/include/pg*.h are generated by

# ./pgrx-pg-sys/generate.sh $(pg_config --pkgincludedir)
./pgrx-pg-sys/generate.sh ~/.pgrx/13.23/pgrx-install/include/postgresql > ./pgrx-pg-sys/include/pg13.h
./pgrx-pg-sys/generate.sh ~/.pgrx/14.23/pgrx-install/include/postgresql > ./pgrx-pg-sys/include/pg14.h
./pgrx-pg-sys/generate.sh ~/.pgrx/15.18/pgrx-install/include/postgresql > ./pgrx-pg-sys/include/pg15.h
./pgrx-pg-sys/generate.sh ~/.pgrx/16.14/pgrx-install/include/postgresql > ./pgrx-pg-sys/include/pg16.h
./pgrx-pg-sys/generate.sh ~/.pgrx/17.10/pgrx-install/include/postgresql > ./pgrx-pg-sys/include/pg17.h
./pgrx-pg-sys/generate.sh ~/.pgrx/18.4/pgrx-install/include/postgresql > ./pgrx-pg-sys/include/pg18.h
./pgrx-pg-sys/generate.sh ~/.pgrx/19beta2/pgrx-install/include/postgresql > ./pgrx-pg-sys/include/pg19.h

fix macos ci only: #2378

@usamoi

usamoi commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

postgres/postgres@8ec5694

It seems that PostgreSQL 14 and earlier versions do not mark all variables as dllimport, which means these symbols cannot be used in Windows extensions.

Probably we can temporarily exclude these problematic headers. Once support for PostgreSQL 14 is dropped by pgrx, we can add them back.

Edit: It seems that too many problematic headers are already being included. Since we cannot remove the problematic headers that are already in use, we could instead remove only the static inline functions that cause compilation failures.

@usamoi
usamoi force-pushed the headers branch 2 times, most recently from ec08824 to 78debf0 Compare September 13, 2026 14:28
@usamoi
usamoi force-pushed the headers branch 2 times, most recently from 65d2c7e to 8813c40 Compare September 13, 2026 14:31
@usamoi
usamoi marked this pull request as ready for review September 13, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant