summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/regress.sgml63
-rw-r--r--doc/src/sgml/release-18.sgml2
-rw-r--r--src/backend/access/brin/brin_minmax_multi.c2
-rw-r--r--src/backend/commands/dbcommands.c2
-rw-r--r--src/backend/commands/publicationcmds.c20
-rw-r--r--src/bin/pg_upgrade/t/002_pg_upgrade.pl3
-rw-r--r--src/test/regress/expected/publication.out15
-rw-r--r--src/test/regress/sql/publication.sql7
8 files changed, 60 insertions, 54 deletions
diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index bf4ffb30576..8838fe7f022 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -285,75 +285,88 @@ make check-world PG_TEST_EXTRA='kerberos ldap ssl load_balance libpq_encryption'
</varlistentry>
<varlistentry>
- <term><literal>sepgsql</literal></term>
+ <term><literal>libpq_encryption</literal></term>
<listitem>
<para>
- Runs the test suite under <filename>contrib/sepgsql</filename>. This
- requires an SELinux environment that is set up in a specific way; see
- <xref linkend="sepgsql-regression"/>.
+ Runs the test <filename>src/interfaces/libpq/t/005_negotiate_encryption.pl</filename>.
+ This opens TCP/IP listen sockets. If <varname>PG_TEST_EXTRA</varname>
+ also includes <literal>kerberos</literal>, additional tests that require
+ an MIT Kerberos installation are enabled.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>ssl</literal></term>
+ <term><literal>load_balance</literal></term>
<listitem>
<para>
- Runs the test suite under <filename>src/test/ssl</filename>. This opens TCP/IP listen sockets.
+ Runs the test <filename>src/interfaces/libpq/t/004_load_balance_dns.pl</filename>.
+ This requires editing the system <filename>hosts</filename> file and
+ opens TCP/IP listen sockets.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>load_balance</literal></term>
+ <term><literal>oauth</literal></term>
<listitem>
<para>
- Runs the test <filename>src/interfaces/libpq/t/004_load_balance_dns.pl</filename>.
- This requires editing the system <filename>hosts</filename> file and
- opens TCP/IP listen sockets.
+ Runs the test suite under <filename>src/test/modules/oauth_validator</filename>.
+ This opens TCP/IP listen sockets for a test server running HTTPS.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>libpq_encryption</literal></term>
+ <term><literal>regress_dump_restore</literal></term>
<listitem>
<para>
- Runs the test <filename>src/interfaces/libpq/t/005_negotiate_encryption.pl</filename>.
- This opens TCP/IP listen sockets. If <varname>PG_TEST_EXTRA</varname>
- also includes <literal>kerberos</literal>, additional tests that require
- an MIT Kerberos installation are enabled.
+ Runs an additional test suite in
+ <filename>src/bin/pg_upgrade/t/002_pg_upgrade.pl</filename> which
+ cycles the regression database through <command>pg_dump</command>/
+ <command>pg_restore</command>. Not enabled by default because it
+ is resource intensive.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>wal_consistency_checking</literal></term>
+ <term><literal>sepgsql</literal></term>
<listitem>
<para>
- Uses <literal>wal_consistency_checking=all</literal> while running
- certain tests under <filename>src/test/recovery</filename>. Not
- enabled by default because it is resource intensive.
+ Runs the test suite under <filename>contrib/sepgsql</filename>. This
+ requires an SELinux environment that is set up in a specific way; see
+ <xref linkend="sepgsql-regression"/>.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>xid_wraparound</literal></term>
+ <term><literal>ssl</literal></term>
<listitem>
<para>
- Runs the test suite under <filename>src/test/modules/xid_wraparound</filename>.
- Not enabled by default because it is resource intensive.
+ Runs the test suite under <filename>src/test/ssl</filename>. This opens TCP/IP listen sockets.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>oauth</literal></term>
+ <term><literal>wal_consistency_checking</literal></term>
<listitem>
<para>
- Runs the test suite under <filename>src/test/modules/oauth_validator</filename>.
- This opens TCP/IP listen sockets for a test server running HTTPS.
+ Uses <literal>wal_consistency_checking=all</literal> while running
+ certain tests under <filename>src/test/recovery</filename>. Not
+ enabled by default because it is resource intensive.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>xid_wraparound</literal></term>
+ <listitem>
+ <para>
+ Runs the test suite under <filename>src/test/modules/xid_wraparound</filename>.
+ Not enabled by default because it is resource intensive.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/release-18.sgml b/doc/src/sgml/release-18.sgml
index f42ba3000bc..ce594b5b4ce 100644
--- a/doc/src/sgml/release-18.sgml
+++ b/doc/src/sgml/release-18.sgml
@@ -1524,7 +1524,7 @@ Author: Amit Kapila <akapila@postgresql.org>
<listitem>
<para>
- Allow inactive replication slots to be automatically invalided using
+ Allow inactive replication slots to be automatically invalidated using
server variable <xref linkend="guc-idle-replication-slot-timeout"/>
(Nisha Moond, Bharath Rupireddy)
<ulink url="&commit_baseurl;ac0e33136">&sect;</ulink>
diff --git a/src/backend/access/brin/brin_minmax_multi.c b/src/backend/access/brin/brin_minmax_multi.c
index 0d1507a2a36..4755c3d0af3 100644
--- a/src/backend/access/brin/brin_minmax_multi.c
+++ b/src/backend/access/brin/brin_minmax_multi.c
@@ -2032,7 +2032,7 @@ brin_minmax_multi_distance_numeric(PG_FUNCTION_ARGS)
d = DirectFunctionCall2(numeric_sub, a2, a1); /* a2 - a1 */
- PG_RETURN_FLOAT8(DirectFunctionCall1(numeric_float8, d));
+ PG_RETURN_DATUM(DirectFunctionCall1(numeric_float8, d));
}
/*
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index c95eb945016..ef99375d72b 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -1052,7 +1052,7 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
dbctype = src_ctype;
if (dblocprovider == '\0')
dblocprovider = src_locprovider;
- if (dblocale == NULL)
+ if (dblocale == NULL && dblocprovider == src_locprovider)
dblocale = src_locale;
if (dbicurules == NULL)
dbicurules = src_icurules;
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c
index 1bf7eaae5b3..803c26ab216 100644
--- a/src/backend/commands/publicationcmds.c
+++ b/src/backend/commands/publicationcmds.c
@@ -2113,20 +2113,20 @@ AlterPublicationOwner_oid(Oid pubid, Oid newOwnerId)
static char
defGetGeneratedColsOption(DefElem *def)
{
- char *sval;
+ char *sval = "";
/*
- * If no parameter value given, assume "stored" is meant.
+ * A parameter value is required.
*/
- if (!def->arg)
- return PUBLISH_GENCOLS_STORED;
-
- sval = defGetString(def);
+ if (def->arg)
+ {
+ sval = defGetString(def);
- if (pg_strcasecmp(sval, "none") == 0)
- return PUBLISH_GENCOLS_NONE;
- if (pg_strcasecmp(sval, "stored") == 0)
- return PUBLISH_GENCOLS_STORED;
+ if (pg_strcasecmp(sval, "none") == 0)
+ return PUBLISH_GENCOLS_NONE;
+ if (pg_strcasecmp(sval, "stored") == 0)
+ return PUBLISH_GENCOLS_STORED;
+ }
ereport(ERROR,
errcode(ERRCODE_SYNTAX_ERROR),
diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
index 7d82593879d..0b15e38297e 100644
--- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl
+++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
@@ -375,6 +375,9 @@ SKIP:
{
my $dstnode = PostgreSQL::Test::Cluster->new('dst_node');
+ skip "regress_dump_restore not enabled in PG_TEST_EXTRA"
+ if (!$ENV{PG_TEST_EXTRA}
+ || $ENV{PG_TEST_EXTRA} !~ /\bregress_dump_restore\b/);
skip "different Postgres versions"
if ($oldnode->pg_version != $dstnode->pg_version);
skip "source node not using default install"
diff --git a/src/test/regress/expected/publication.out b/src/test/regress/expected/publication.out
index 1ec3fa34a2d..53268059142 100644
--- a/src/test/regress/expected/publication.out
+++ b/src/test/regress/expected/publication.out
@@ -36,6 +36,9 @@ LINE 1: ...pub_xxx WITH (publish_generated_columns = stored, publish_ge...
CREATE PUBLICATION testpub_xxx WITH (publish_generated_columns = foo);
ERROR: invalid value for publication parameter "publish_generated_columns": "foo"
DETAIL: Valid values are "none" and "stored".
+CREATE PUBLICATION testpub_xxx WITH (publish_generated_columns);
+ERROR: invalid value for publication parameter "publish_generated_columns": ""
+DETAIL: Valid values are "none" and "stored".
\dRp
List of publications
Name | Owner | All tables | Inserts | Updates | Deletes | Truncates | Generated columns | Via root
@@ -1844,8 +1847,7 @@ DROP SCHEMA sch1 cascade;
DROP SCHEMA sch2 cascade;
-- ======================================================
-- Test the 'publish_generated_columns' parameter with the following values:
--- 'stored', 'none', and the default (no value specified), which defaults to
--- 'stored'.
+-- 'stored', 'none'.
SET client_min_messages = 'ERROR';
CREATE PUBLICATION pub1 FOR ALL TABLES WITH (publish_generated_columns = stored);
\dRp+ pub1
@@ -1863,17 +1865,8 @@ CREATE PUBLICATION pub2 FOR ALL TABLES WITH (publish_generated_columns = none);
regress_publication_user | t | t | t | t | t | none | f
(1 row)
-CREATE PUBLICATION pub3 FOR ALL TABLES WITH (publish_generated_columns);
-\dRp+ pub3
- Publication pub3
- Owner | All tables | Inserts | Updates | Deletes | Truncates | Generated columns | Via root
---------------------------+------------+---------+---------+---------+-----------+-------------------+----------
- regress_publication_user | t | t | t | t | t | stored | f
-(1 row)
-
DROP PUBLICATION pub1;
DROP PUBLICATION pub2;
-DROP PUBLICATION pub3;
-- Test the 'publish_generated_columns' parameter as 'none' and 'stored' for
-- different scenarios with/without generated columns in column lists.
CREATE TABLE gencols (a int, gen1 int GENERATED ALWAYS AS (a * 2) STORED);
diff --git a/src/test/regress/sql/publication.sql b/src/test/regress/sql/publication.sql
index 2585f083181..deddf0da844 100644
--- a/src/test/regress/sql/publication.sql
+++ b/src/test/regress/sql/publication.sql
@@ -26,6 +26,7 @@ CREATE PUBLICATION testpub_xxx WITH (publish = 'cluster, vacuum');
CREATE PUBLICATION testpub_xxx WITH (publish_via_partition_root = 'true', publish_via_partition_root = '0');
CREATE PUBLICATION testpub_xxx WITH (publish_generated_columns = stored, publish_generated_columns = none);
CREATE PUBLICATION testpub_xxx WITH (publish_generated_columns = foo);
+CREATE PUBLICATION testpub_xxx WITH (publish_generated_columns);
\dRp
@@ -1183,19 +1184,15 @@ DROP SCHEMA sch2 cascade;
-- ======================================================
-- Test the 'publish_generated_columns' parameter with the following values:
--- 'stored', 'none', and the default (no value specified), which defaults to
--- 'stored'.
+-- 'stored', 'none'.
SET client_min_messages = 'ERROR';
CREATE PUBLICATION pub1 FOR ALL TABLES WITH (publish_generated_columns = stored);
\dRp+ pub1
CREATE PUBLICATION pub2 FOR ALL TABLES WITH (publish_generated_columns = none);
\dRp+ pub2
-CREATE PUBLICATION pub3 FOR ALL TABLES WITH (publish_generated_columns);
-\dRp+ pub3
DROP PUBLICATION pub1;
DROP PUBLICATION pub2;
-DROP PUBLICATION pub3;
-- Test the 'publish_generated_columns' parameter as 'none' and 'stored' for
-- different scenarios with/without generated columns in column lists.