Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 17 additions & 1 deletion pglite/other_extensions/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) ==="
Expand Down
1 change: 1 addition & 0 deletions pglite/other_extensions/plpgsql_check
Submodule plpgsql_check added at 7e1d6f