h3-pg
h3-pg copied to clipboard
Building against PostgreSQL 17 with pgindent
I had to make the following change to build this from source:
root@25fb469edc54:/h3-pg# git diff
diff --git a/cmake/AddPostgreSQLExtension.cmake b/cmake/AddPostgreSQLExtension.cmake
index a9a8cf7..6fdee23 100644
--- a/cmake/AddPostgreSQLExtension.cmake
+++ b/cmake/AddPostgreSQLExtension.cmake
@@ -88,7 +88,7 @@ function(PostgreSQL_add_extension LIBRARY_NAME)
# Setup auto-format
if(PostgreSQL_INDENT)
add_custom_target("format_${EXTENSION_NAME}"
- COMMAND ${PostgreSQL_INDENT} ${EXTENSION_SOURCES}
+ COMMAND ${PostgreSQL_INDENT} --typedefs=/usr/share/postgresql/17/typedefs.list ${EXTENSION_SOURCES}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Formatting ${EXTENSION_NAME} sources"
)
Here's the container setup for where I'm building this:
FROM docker.io/library/postgres:17 AS database
RUN apt-get update && \
apt-get install \
build-essential \
clang-format \
clang-tidy \
cmake \
postgresql-server-dev-17 \
postgresql-server-dev-17-dbgsym
Not sure if my environment is weird or if this is something that's changed from previous Postgres releases.
Thanks for the heads-up!
- Did it work previously?
- What was the error message?
- Are you trying to compile a custom build or just install a regular release?
The intention is for pgindent to be ignored unless installed. I should probably make sure auto-format is not run as part of a regular install. 🤔