Skip to content

Building against PostgreSQL 17 with pgindent #178

@CtrlC-Root

Description

@CtrlC-Root

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions