Skip to content

Commit 4dfba1d

Browse files
authored
Merge pull request #1199 from hs-liuxh/IVORY_REL_5_STABLE
Sync IvorySQL v5.3 with PostgreSQL 18.3
2 parents 4a226f7 + 5237a70 commit 4dfba1d

File tree

63 files changed

+6070
-5002
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+6070
-5002
lines changed

.abi-compliance-history

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818
# Be sure to replace "<ADD JUSTIFICATION HERE>" with details of your change and
1919
# why it is deemed acceptable.
2020

21+
8d9a97e0bb6d820dac553848f0d5d8cc3f3e219d
22+
#
23+
# Avoid name collision with NOT NULL constraints
24+
# 2026-02-21 12:22:08 +0100
25+
#
26+
# AddRelationNotNullConstraints() needs to receive the names of constraints
27+
# already created, so that it can avoid those names when assigning names to
28+
# not-null constraints. The purpose of this function is rather obscure, and
29+
# furthermore it's new in 18, so I don't expect any third-party code to break.
30+
#
31+
# Discussion: https://postgr.es/m/[email protected]
32+
2133
33e3de6d77e87d6c3c6f8f878dd8de42d37c3b8f
2234
#
2335
# Add file_extend_method=posix_fallocate,write_zeros.

configure

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for PostgreSQL 18.2.
3+
# Generated by GNU Autoconf 2.69 for PostgreSQL 18.3.
44
#
55
# Report bugs to <[email protected]>.
66
#
@@ -583,8 +583,8 @@ MAKEFLAGS=
583583
# Identity of this package.
584584
PACKAGE_NAME='PostgreSQL'
585585
PACKAGE_TARNAME='postgresql'
586-
PACKAGE_VERSION='18.2'
587-
PACKAGE_STRING='PostgreSQL 18.2'
586+
PACKAGE_VERSION='18.3'
587+
PACKAGE_STRING='PostgreSQL 18.3'
588588
PACKAGE_BUGREPORT='[email protected]'
589589
PACKAGE_URL='https://www.postgresql.org/'
590590

@@ -1473,7 +1473,7 @@ if test "$ac_init_help" = "long"; then
14731473
# Omit some internal or obsolete options to make the list less imposing.
14741474
# This message is too long to be a string in the A/UX 3.1 sh.
14751475
cat <<_ACEOF
1476-
\`configure' configures PostgreSQL 18.2 to adapt to many kinds of systems.
1476+
\`configure' configures PostgreSQL 18.3 to adapt to many kinds of systems.
14771477

14781478
Usage: $0 [OPTION]... [VAR=VALUE]...
14791479

@@ -1538,7 +1538,7 @@ fi
15381538

15391539
if test -n "$ac_init_help"; then
15401540
case $ac_init_help in
1541-
short | recursive ) echo "Configuration of PostgreSQL 18.2:";;
1541+
short | recursive ) echo "Configuration of PostgreSQL 18.3:";;
15421542
esac
15431543
cat <<\_ACEOF
15441544

@@ -1733,7 +1733,7 @@ fi
17331733
test -n "$ac_init_help" && exit $ac_status
17341734
if $ac_init_version; then
17351735
cat <<\_ACEOF
1736-
PostgreSQL configure 18.2
1736+
PostgreSQL configure 18.3
17371737
generated by GNU Autoconf 2.69
17381738

17391739
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2486,7 +2486,7 @@ cat >config.log <<_ACEOF
24862486
This file contains any messages produced by compilers while
24872487
running configure, to aid debugging if configure makes a mistake.
24882488

2489-
It was created by PostgreSQL $as_me 18.2, which was
2489+
It was created by PostgreSQL $as_me 18.3, which was
24902490
generated by GNU Autoconf 2.69. Invocation command line was
24912491

24922492
$ $0 $@
@@ -19645,7 +19645,7 @@ else
1964519645
fi
1964619646

1964719647
# IvorySQL version
19648-
PACKAGE_IVORYSQL_VERSION='5.1'
19648+
PACKAGE_IVORYSQL_VERSION='5.3'
1964919649

1965019650
cat >>confdefs.h <<_ACEOF
1965119651
#define PACKAGE_IVORYSQL_VERSION "$PACKAGE_IVORYSQL_VERSION"
@@ -20246,7 +20246,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2024620246
# report actual input values of CONFIG_FILES etc. instead of their
2024720247
# values after options handling.
2024820248
ac_log="
20249-
This file was extended by PostgreSQL $as_me 18.2, which was
20249+
This file was extended by PostgreSQL $as_me 18.3, which was
2025020250
generated by GNU Autoconf 2.69. Invocation command line was
2025120251

2025220252
CONFIG_FILES = $CONFIG_FILES
@@ -20317,7 +20317,7 @@ _ACEOF
2031720317
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2031820318
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
2031920319
ac_cs_version="\\
20320-
PostgreSQL config.status 18.2
20320+
PostgreSQL config.status 18.3
2032120321
configured by $0, generated by GNU Autoconf 2.69,
2032220322
with options \\"\$ac_cs_config\\"
2032320323

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dnl Read the Autoconf manual for details.
1717
dnl
1818
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
1919

20-
AC_INIT([PostgreSQL], [18.2], [[email protected]], [], [https://www.postgresql.org/])
20+
AC_INIT([PostgreSQL], [18.3], [[email protected]], [], [https://www.postgresql.org/])
2121

2222
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
2323
Untested combinations of 'autoconf' and PostgreSQL versions are not
@@ -31,7 +31,7 @@ AC_PREFIX_DEFAULT(/usr/local/pgsql)
3131
AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["$ac_configure_args"], [Saved arguments from configure])
3232

3333
# IvorySQL version
34-
PACKAGE_IVORYSQL_VERSION='5.1'
34+
PACKAGE_IVORYSQL_VERSION='5.3'
3535

3636
[PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`]
3737
[PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`]

contrib/hstore/hstore_io.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,8 @@ hstoreUniquePairs(Pairs *a, int32 l, int32 *buflen)
385385
if (ptr->needfree)
386386
{
387387
pfree(ptr->key);
388-
pfree(ptr->val);
388+
if (ptr->val != NULL)
389+
pfree(ptr->val);
389390
}
390391
}
391392
else

contrib/pg_trgm/trgm_op.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ generate_trgm_only(growable_trgm_array *dst, char *str, int slen, TrgmBound **bo
533533
{
534534
if (bounds_allocated < dst->length)
535535
{
536-
bounds = repalloc0_array(bounds, TrgmBound, bounds_allocated, dst->allocated);
536+
bounds = *bounds_p = repalloc0_array(bounds, TrgmBound, bounds_allocated, dst->allocated);
537537
bounds_allocated = dst->allocated;
538538
}
539539

contrib/pgcrypto/expected/pgp-pubkey-session.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ ff62c0a33d9143dd3f639893f47732c11c5a12c6052d1935f4d507b7ae1f76ab0e9a69b8
4444
7305a7f7c19bd509daf4903bff614bc26d118f03e461469c72c12d3a2bb4f78e4d342ce8
4545
487723649a01ed2b9eb11c662134502c098d55dfcd361939d8370873422c3da75a515a75
4646
9ffedfe7df44fb3c20f81650801a30d43b5c90b98b3eee'::bytea);
47-
ERROR: Public key too big
47+
ERROR: Session key too big

contrib/pgcrypto/px.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static const struct error_desc px_err_list[] = {
6565
{PXE_PGP_UNEXPECTED_PKT, "Unexpected packet in key data"},
6666
{PXE_PGP_MATH_FAILED, "Math operation failed"},
6767
{PXE_PGP_SHORT_ELGAMAL_KEY, "Elgamal keys must be at least 1024 bits long"},
68-
{PXE_PGP_KEY_TOO_BIG, "Public key too big"},
68+
{PXE_PGP_KEY_TOO_BIG, "Session key too big"},
6969
{PXE_PGP_UNKNOWN_PUBALGO, "Unknown public-key encryption algorithm"},
7070
{PXE_PGP_WRONG_KEY, "Wrong key"},
7171
{PXE_PGP_MULTIPLE_KEYS,

contrib/postgres_fdw/expected/ivy_postgres_fdw.out

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7595,20 +7595,31 @@ UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END
75957595
ALTER SERVER loopback OPTIONS (DROP extensions);
75967596
INSERT INTO ft2 (c1,c2,c3)
75977597
SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id;
7598+
-- this will do a remote seqscan, causing unstable result order, so sort
75987599
EXPLAIN (verbose, costs off)
7599-
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *; -- can't be pushed down
7600-
QUERY PLAN
7601-
----------------------------------------------------------------------------------------------------------
7602-
Update on public.ft2
7603-
Output: c1, c2, c3, c4, c5, c6, c7, c8
7604-
Remote SQL: UPDATE "S 1"."T 1" SET c3 = $2 WHERE ctid = $1 RETURNING "C 1", c2, c3, c4, c5, c6, c7, c8
7605-
-> Foreign Scan on public.ft2
7606-
Output: 'bar'::varchar2(1024), ctid, ft2.*
7607-
Filter: (postgres_fdw_abs(ft2.c1) > 2000)
7608-
Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8, ctid FROM "S 1"."T 1" FOR UPDATE
7609-
(7 rows)
7600+
WITH cte AS (
7601+
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *
7602+
) SELECT * FROM cte ORDER BY c1; -- can't be pushed down
7603+
QUERY PLAN
7604+
------------------------------------------------------------------------------------------------------------------
7605+
Sort
7606+
Output: cte.c1, cte.c2, cte.c3, cte.c4, cte.c5, cte.c6, cte.c7, cte.c8
7607+
Sort Key: cte.c1
7608+
CTE cte
7609+
-> Update on public.ft2
7610+
Output: ft2.c1, ft2.c2, ft2.c3, ft2.c4, ft2.c5, ft2.c6, ft2.c7, ft2.c8
7611+
Remote SQL: UPDATE "S 1"."T 1" SET c3 = $2 WHERE ctid = $1 RETURNING "C 1", c2, c3, c4, c5, c6, c7, c8
7612+
-> Foreign Scan on public.ft2
7613+
Output: 'bar'::varchar2(1024), ft2.ctid, ft2.*
7614+
Filter: (postgres_fdw_abs(ft2.c1) > 2000)
7615+
Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8, ctid FROM "S 1"."T 1" FOR UPDATE
7616+
-> CTE Scan on cte
7617+
Output: cte.c1, cte.c2, cte.c3, cte.c4, cte.c5, cte.c6, cte.c7, cte.c8
7618+
(13 rows)
76107619

7611-
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *;
7620+
WITH cte AS (
7621+
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *
7622+
) SELECT * FROM cte ORDER BY c1;
76127623
c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8
76137624
------+----+-----+----+----+----+------------+----
76147625
2001 | 1 | bar | | | | ft2 |

contrib/postgres_fdw/expected/postgres_fdw.out

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6489,20 +6489,31 @@ UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END
64896489
ALTER SERVER loopback OPTIONS (DROP extensions);
64906490
INSERT INTO ft2 (c1,c2,c3)
64916491
SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id;
6492+
-- this will do a remote seqscan, causing unstable result order, so sort
64926493
EXPLAIN (verbose, costs off)
6493-
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *; -- can't be pushed down
6494-
QUERY PLAN
6495-
----------------------------------------------------------------------------------------------------------
6496-
Update on public.ft2
6497-
Output: c1, c2, c3, c4, c5, c6, c7, c8
6498-
Remote SQL: UPDATE "S 1"."T 1" SET c3 = $2 WHERE ctid = $1 RETURNING "C 1", c2, c3, c4, c5, c6, c7, c8
6499-
-> Foreign Scan on public.ft2
6500-
Output: 'bar'::text, ctid, ft2.*
6501-
Filter: (postgres_fdw_abs(ft2.c1) > 2000)
6502-
Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8, ctid FROM "S 1"."T 1" FOR UPDATE
6503-
(7 rows)
6494+
WITH cte AS (
6495+
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *
6496+
) SELECT * FROM cte ORDER BY c1; -- can't be pushed down
6497+
QUERY PLAN
6498+
------------------------------------------------------------------------------------------------------------------
6499+
Sort
6500+
Output: cte.c1, cte.c2, cte.c3, cte.c4, cte.c5, cte.c6, cte.c7, cte.c8
6501+
Sort Key: cte.c1
6502+
CTE cte
6503+
-> Update on public.ft2
6504+
Output: ft2.c1, ft2.c2, ft2.c3, ft2.c4, ft2.c5, ft2.c6, ft2.c7, ft2.c8
6505+
Remote SQL: UPDATE "S 1"."T 1" SET c3 = $2 WHERE ctid = $1 RETURNING "C 1", c2, c3, c4, c5, c6, c7, c8
6506+
-> Foreign Scan on public.ft2
6507+
Output: 'bar'::text, ft2.ctid, ft2.*
6508+
Filter: (postgres_fdw_abs(ft2.c1) > 2000)
6509+
Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8, ctid FROM "S 1"."T 1" FOR UPDATE
6510+
-> CTE Scan on cte
6511+
Output: cte.c1, cte.c2, cte.c3, cte.c4, cte.c5, cte.c6, cte.c7, cte.c8
6512+
(13 rows)
65046513

6505-
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *;
6514+
WITH cte AS (
6515+
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *
6516+
) SELECT * FROM cte ORDER BY c1;
65066517
c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8
65076518
------+----+-----+----+----+----+------------+----
65086519
2001 | 1 | bar | | | | ft2 |

contrib/postgres_fdw/sql/ivy_postgres_fdw.sql

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,9 +1677,15 @@ UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END
16771677
ALTER SERVER loopback OPTIONS (DROP extensions);
16781678
INSERT INTO ft2 (c1,c2,c3)
16791679
SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id;
1680+
1681+
-- this will do a remote seqscan, causing unstable result order, so sort
16801682
EXPLAIN (verbose, costs off)
1681-
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *; -- can't be pushed down
1682-
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *;
1683+
WITH cte AS (
1684+
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *
1685+
) SELECT * FROM cte ORDER BY c1; -- can't be pushed down
1686+
WITH cte AS (
1687+
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *
1688+
) SELECT * FROM cte ORDER BY c1;
16831689
EXPLAIN (verbose, costs off)
16841690
UPDATE ft2 SET c3 = 'baz'
16851691
FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1)

0 commit comments

Comments
 (0)