Skip to content

Latest commit

 

History

History
159 lines (117 loc) · 6.28 KB

File metadata and controls

159 lines (117 loc) · 6.28 KB

2.0.0

Remove .source file support

PostgreSQL removed .source file processing from pg_regress in PG15. The input/.sourcesql/.sql and output/.sourceexpected/.out conversion mechanism no longer functions. All related variables (TESTSOURCE*), the make_results.sh helper script, and the special-case logic in make results have been removed. Extensions that used .source files should convert them to regular test/sql/.sql and test/expected/.out files using relative paths.

Add test-build for pre-test validation

When CREATE EXTENSION fails due to a SQL syntax error, PostgreSQL reports only a cryptic error with limited context. test-build runs your extension SQL directly through pg_regress first, so syntax errors show the exact file, line, and position — cutting debugging time significantly. Place SQL files in test/build/ to enable; auto-detects based on file presence.

Add test/install for one-time test setup

Extensions that install dependencies or run expensive setup in every test file pay that cost once per test. test/install runs setup SQL once before the entire test suite, and all regular tests share the resulting database state. This can dramatically speed up test suites that install extensions or load fixtures. Place SQL files in test/install/ to enable; auto-detects based on file presence.

Add verify-results safeguard for make results

make results now refuses to run when tests are failing (detected via regression.diffs). Prevents accidentally blessing incorrect output as the new expected results. Enabled by default; disable with PGXNTOOL_ENABLE_VERIFY_RESULTS=no.

Fix bash 3.2 compatibility and shebang portability

${ARRAY[@]:-0} is a syntax error in bash 3.2; replaced with ${#ARRAY[@]}. Shell scripts now use !/usr/bin/env bash.

1.1.2

Fix double --dbname bug that defeated unique test database names

The unique database naming introduced in 1.1.0 was ineffective because base.mk added --dbname=$(REGRESS_DBNAME) to REGRESS_OPTS while PGXS also appends --dbname=$(CONTRIB_TESTDB). The second --dbname caused pg_regress to create a contrib_regression database that collided across projects. Fixed by overriding CONTRIB_TESTDB after include $(PGXS) instead.

1.1.1

Fix pg_tle exception handler and empty upgrade files

The exception handler for uninstall_extension() now correctly catches no_data_found (P0002) instead of undefined_object (42704). Empty upgrade files are now treated as valid no-op upgrades for version bumps. Added ON_ERROR_STOP=1 to run_pgtle_sql() so psql errors propagate correctly.

1.1.0

Use unique database names for tests

Tests now use a unique database name based on the project name and a hash of the current directory. This prevents test conflicts when running tests for multiple projects in parallel.

Add 3-way merge support for setup files after pgxntool-sync

New update-setup-files.sh script handles merging changes to files initially copied by setup.sh (.gitignore, test/deps.sql). After running make pgxntool-sync, the script performs a 3-way merge if both you and pgxntool have modified the same file, using git’s native conflict markers for resolution.

1.0.0

Fix broken multi-extension support

Prior to this fix, distributions with multiple extensions or extensions with versions different from the PGXN distribution version were completely broken. Extension versions are now correctly read from each .control file’s default_version instead of using META.json’s distribution version.

Add pg_tle support

New make pgtle target generates pg_tle registration SQL for extensions. Supports pg_tle version ranges (1.0.0-1.4.0, 1.4.0-1.5.0, 1.5.0+) with appropriate API calls for each range. See README for usage.

Use git tags for distribution versioning

The tag and rmtag targets now create/delete git tags instead of branches.

Support 13+

The --load-language option was removed from pg_regress in 13.

Reduce verbosity from test setup

As part of this change, you will want to review the changes to test/deps.sql.

Support asciidoc documentation targets

By default, if asciidoctor or asciidoc exists on the system, any files in doc/ that end in .adoc or .asciidoc will be processed to html.

See the README for full details.

Support 9.2

CREATE SCHEMA IF NOT EXISTS doesn’t work before 9.3.

Make installcheck depend on test input files

If a test input file changes we certainly need to re-run tests.

Have test/pgxntool/setup.sql install tap before running deps.sql

Support other asciidoc extensions

Create the test/sql/ directory during setup

Use --sudo option when installing pgtap

0.2.0

Stop using $(VERSION)

VERSION is defined by PGXS itself, so trying to use it causes problems.

Handle Postgres version 10+

Old code didn’t deal with the lack of a . that can appear in a 10+ version.

0.1.10

Remove invalid git subtree pull options

0.1.9

Install upgrade scripts

Fixes a bug where upgrade scripts (namely, sql/----*.sql) were not being installed.

0.1.8

Remove META.json processing from base.mk

Processing the META file from inside make was problematic with make dependencies. Now, a meta.mk file is generated and included as part of base.mk.

Fix bugs with test directory creation

0.1.7

Better handling of test directories

Missing test directories should now be created as necessary.

Ensure git repository is clean when running setup.sh

Fix bug for excluding .asc files

Enforce bash since -o errtrace isn’t valid sh

Paul Norman #3

Minor documentation tweaks

0.1.6

Remove tap stuff from deps.sql

Having the tap stuff in deps.sql was confusing because it was also loaded by setup.sql. Just let setup.sql handle it, as that’s what most people should probably do. At some point we’ll probably need a way to over-ride this though…​

Improve warning about extra pgxntool-sync-* targets

0.1.5

Change $(DATA) to rely on $(EXTENSION_VERSION_FILES) instead of what’s on the filesystem.

This is necessary because some install targets are generated and would not necessarily be on the filesystem when we installed. This also prevents installing leftover cruft from old versions.

Improve formatting of print-% target