public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Postgres hackers <[email protected]>
Subject: Add documentation for PG_ABS_SRCDIR, PG_ABS_BUILDDIR, PG_LIBDIR, PG_DLSUFFIX
Date: Wed, 11 Mar 2026 10:07:39 +0900
Message-ID: <[email protected]> (raw)
Hi all,
d1029bb5a26c has switched the in-core tests suited based on pg_regress
to do path substitutions based on the set of environment variables
listed in $subject, rather than replacements based on input and output
files, generating new files.
These can be really useful for extension developers who maintain SQL
test suites, so how about documenting them?
I'd like to propose the attached patch, for HEAD, so as one does not
need to guess their existence from the SQL files or pg_regress.c.
Thoughts or comments?
--
Michael
diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index d80dd46c5fdb..e3c4a0525ad7 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -444,6 +444,59 @@ make check LANG=C ENCODING=EUC_JP
</para>
</sect2>
+ <sect2 id="regress-run-path-substitution">
+ <title>Path Substitution</title>
+
+ <para>
+ The test suites driven by <command>pg_regress</command> can use the
+ following environment variables for path substitutions:
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>PG_ABS_SRCDIR</literal></term>
+ <listitem>
+ <para>
+ Absolute path to the source directory.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>PG_ABS_BUILDDIR</literal></term>
+ <listitem>
+ <para>
+ Absolute path to the build directory.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>PG_DLSUFFIX</literal></term>
+ <listitem>
+ <para>
+ Name of extension for dynamically-loadable modules (e.g.
+ <literal>.so</literal> on Linux).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>PG_LIBDIR</literal></term>
+ <listitem>
+ <para>
+ Absolute path to dynamic libraries.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ These are useful when dealing with function and object loading
+ that require specific paths to work, like paths defined in a
+ <command>CREATE FUNCTION</command> or <command>LOAD</command>
+ command, for example.
+ </para>
+ </sect2>
+
<sect2 id="regress-run-custom-settings">
<title>Custom Server Settings</title>
Attachments:
[text/plain] doc-path-subs.patch (1.7K, 2-doc-path-subs.patch)
download | inline diff:
diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index d80dd46c5fdb..e3c4a0525ad7 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -444,6 +444,59 @@ make check LANG=C ENCODING=EUC_JP
</para>
</sect2>
+ <sect2 id="regress-run-path-substitution">
+ <title>Path Substitution</title>
+
+ <para>
+ The test suites driven by <command>pg_regress</command> can use the
+ following environment variables for path substitutions:
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>PG_ABS_SRCDIR</literal></term>
+ <listitem>
+ <para>
+ Absolute path to the source directory.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>PG_ABS_BUILDDIR</literal></term>
+ <listitem>
+ <para>
+ Absolute path to the build directory.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>PG_DLSUFFIX</literal></term>
+ <listitem>
+ <para>
+ Name of extension for dynamically-loadable modules (e.g.
+ <literal>.so</literal> on Linux).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>PG_LIBDIR</literal></term>
+ <listitem>
+ <para>
+ Absolute path to dynamic libraries.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ These are useful when dealing with function and object loading
+ that require specific paths to work, like paths defined in a
+ <command>CREATE FUNCTION</command> or <command>LOAD</command>
+ command, for example.
+ </para>
+ </sect2>
+
<sect2 id="regress-run-custom-settings">
<title>Custom Server Settings</title>
[application/pgp-signature] signature.asc (833B, 3-signature.asc)
download
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Add documentation for PG_ABS_SRCDIR, PG_ABS_BUILDDIR, PG_LIBDIR, PG_DLSUFFIX
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox