-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Summary
Add a make print-pgtle target that outputs the correct pg_tle registration SQL to stdout, using version-aware directory selection.
Motivation
When building combined pg_tle registration files (e.g., pgtle-all.sql that registers multiple extensions in dependency order), consumers currently need to know:
- The extension name (from
.controlfile) - The correct
pg_tle/{version-range}/directory for the installed pg_tle version - The file path within that directory
A print-pgtle target would encapsulate this logic, making combined file generation simpler:
# Current approach (consumer must know internals):
ext=$$(basename ../deps/cat_tools/*.control .control); \
echo "\\ir ../deps/cat_tools/$$(pgxntool/pgtle.sh --get-dir $$PGTLE_VERSION)/$$ext.sql"
# With print-pgtle (consumer just calls make):
$(MAKE) -C ../deps/cat_tools print-pgtleProposed Behavior
# Outputs the pg_tle SQL content to stdout
make print-pgtle
# With explicit version
make print-pgtle PGTLE_VERSION=1.5.2The target would:
- Detect pg_tle version (from
PGTLE_VERSIONenv/var, or viapgtle.sh --get-version) - Select the correct version directory via
pgtle.sh --get-dir - Output the registration SQL to stdout
This pairs well with pgxntool's existing pgtle and run-pgtle targets in base.mk.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels