From e273c1811525cb7b7b063a8020f8853c8065560d Mon Sep 17 00:00:00 2001 From: racinette Date: Fri, 17 Jul 2026 14:40:28 +0300 Subject: [PATCH 1/2] add plpgsql_check extension --- .gitmodules | 3 +++ pglite/other_extensions/Makefile | 18 +++++++++++++++++- pglite/other_extensions/plpgsql_check | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) create mode 160000 pglite/other_extensions/plpgsql_check diff --git a/.gitmodules b/.gitmodules index 7510d1a707b74..9051680962f18 100644 --- a/.gitmodules +++ b/.gitmodules @@ -29,3 +29,6 @@ [submodule "pglite/other_extensions/pgmq"] path = pglite/other_extensions/pgmq url = https://github.com/pgmq/pgmq +[submodule "pglite/other_extensions/plpgsql_check"] + path = pglite/other_extensions/plpgsql_check + url = https://github.com/okbob/plpgsql_check.git diff --git a/pglite/other_extensions/Makefile b/pglite/other_extensions/Makefile index 601f0ffb12545..31d7e8dbd2c95 100644 --- a/pglite/other_extensions/Makefile +++ b/pglite/other_extensions/Makefile @@ -9,7 +9,8 @@ SUBDIRS = \ pg_uuidv7 \ pg_hashids \ pg_textsearch \ - pgmq/pgmq-extension + pgmq/pgmq-extension \ + plpgsql_check prefix ?= /pglite EXTENSIONS_BUILD_ROOT := /tmp/extensions/build @@ -33,6 +34,21 @@ dist: $(addsuffix .tar.gz,$(EXTENSIONS)) files=$$(find . -type f -o -type l | sed 's|^\./||') && \ tar -czf $(ARCHIVE_DIR)/$$(basename $*)\.tar.gz $$files +# plpgsql_check's upstream Makefile hardcodes -g; strip the debug info at +# packaging time (instead of patching the submodule) to keep the .so small +# and avoid shipping DWARF sections. +plpgsql_check.tar.gz: + @echo "=== Staging plpgsql_check ===" + rm -rf $(EXTENSIONS_BUILD_ROOT)/plpgsql_check + bash -c 'mkdir -p $(EXTENSIONS_BUILD_ROOT)/plpgsql_check/$(prefix)/{bin,lib,share/extension,share/doc,share/postgresql/extension,share/postgresql/tsearch_data,include}' + $(MAKE) -C plpgsql_check install DESTDIR=$(EXTENSIONS_BUILD_ROOT)/plpgsql_check + emstrip --strip-debug $(EXTENSIONS_BUILD_ROOT)/plpgsql_check/$(prefix)/lib/postgresql/plpgsql_check.so + @echo "=== Packaging plpgsql_check ===" + mkdir -p $(ARCHIVE_DIR) + cd $(EXTENSIONS_BUILD_ROOT)/plpgsql_check/$(prefix) && \ + files=$$(find . -type f -o -type l | sed 's|^\./||') && \ + tar -czf $(ARCHIVE_DIR)/plpgsql_check.tar.gz $$files + # AGE requires SIZEOF_DATUM=4 for 32-bit WASM compatibility (strips PASSEDBYVALUE from graphid) age.tar.gz: @echo "=== Staging age (with 32-bit support) ===" diff --git a/pglite/other_extensions/plpgsql_check b/pglite/other_extensions/plpgsql_check new file mode 160000 index 0000000000000..7e1d6fcc6d3d5 --- /dev/null +++ b/pglite/other_extensions/plpgsql_check @@ -0,0 +1 @@ +Subproject commit 7e1d6fcc6d3d5d5fd83337ea6a07003ddcaa3bf3 From 5c9cac9846e416fef4fdc4accebf3a056b9719db Mon Sep 17 00:00:00 2001 From: racinette Date: Sat, 1 Aug 2026 19:00:19 +0300 Subject: [PATCH 2/2] bump plpgsql_check to v2.10.4 --- pglite/other_extensions/plpgsql_check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pglite/other_extensions/plpgsql_check b/pglite/other_extensions/plpgsql_check index 7e1d6fcc6d3d5..c882056fac655 160000 --- a/pglite/other_extensions/plpgsql_check +++ b/pglite/other_extensions/plpgsql_check @@ -1 +1 @@ -Subproject commit 7e1d6fcc6d3d5d5fd83337ea6a07003ddcaa3bf3 +Subproject commit c882056fac65532dee95fc174c4fdc0cc0965293