Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
dfc15bd
doc: Clarify RLS policies applied for ON CONFLICT DO NOTHING.
deanrasheed Feb 11, 2026
7233e70
doc: Mention all SELECT privileges required by INSERT ... ON CONFLICT.
deanrasheed Feb 11, 2026
946b653
Further stabilize a postgres_fdw test case.
tglsfdc Feb 11, 2026
53463b4
Fix pg_stat_get_backend_wait_event() for aux processes
hlinnaka Feb 11, 2026
ce4b7e3
Fix plpgsql's handling of "return simple_record_variable".
tglsfdc Feb 11, 2026
b080339
Make pg_numa_query_pages() work in frontend programs
hlinnaka Feb 12, 2026
5b0e0c3
Improve error message for checksum failures in pgstat_database.c
michaelpq Feb 13, 2026
4174e41
pg_mblen_range, pg_mblen_with_len: Valgrind after encoding ereport.
nmisch Feb 14, 2026
6e045e1
Fix SUBSTRING() for toasted multibyte characters.
nmisch Feb 14, 2026
770d13d
pgcrypto: Tweak error message for incorrect session key length
michaelpq Feb 16, 2026
817f746
Don't reset 'latest_page_number' when replaying multixid truncation
hlinnaka Feb 16, 2026
4a0843c
hstore: Fix NULL pointer dereference with receive function
michaelpq Feb 16, 2026
d04b34d
Suppress new "may be used uninitialized" warning.
nmisch Feb 17, 2026
ccc9be8
Fix test_valid_server_encoding helper function.
macdice Feb 17, 2026
2f6ee7b
Fix the volatility setting of json{b}_strip_nulls
adunstan Feb 17, 2026
649bd26
Update obsolete comment
alvherre Feb 18, 2026
e3cee40
Add translator comment
alvherre Feb 19, 2026
ed57c20
Fix computation of varnullingrels when translating appendrel Var
Feb 20, 2026
041e02e
Fix expanding 'bounds' in pg_trgm's calc_word_similarity() function
hlinnaka Feb 20, 2026
c5edc6c
First-draft release notes for 18.3.
tglsfdc Feb 20, 2026
8d9a97e
Avoid name collision with NOT NULL constraints
alvherre Feb 21, 2026
70eca78
Update .abi-compliance-history for AddRelationNotNullConstraints().
alvherre Feb 21, 2026
24a5901
Release notes for 18.3, 17.9, 16.13, 15.17, 14.22.
tglsfdc Feb 22, 2026
1598d06
Translation updates
petere Feb 23, 2026
62d6c7d
Stamp 18.3.
tglsfdc Feb 23, 2026
3764a14
Merge tag 'REL_18_3' into doc_ja_18_3
noborus Feb 26, 2026
e4208ee
18.3の翻訳準備
noborus Feb 26, 2026
2fe816c
insert.sgmlの18.3対応です
noborus Mar 19, 2026
0c0de54
translate all of 18.3 release
kitayama Mar 19, 2026
ccaea52
create_policy.sgmlの18.3対応です
noborus Mar 19, 2026
2170d1e
copilotの指摘修正
noborus Mar 19, 2026
b58aef9
Implementation of Copilot suggestions
kitayama Mar 26, 2026
6fc8a0c
Merge pull request #3631 from noborus/insert183
noborus Mar 26, 2026
54295ad
Merge pull request #3633 from kitayama/release183-2
noborus Mar 26, 2026
3d60dab
Merge pull request #3634 from noborus/ref/create_policy183
noborus Mar 26, 2026
b661bc4
Merge branch 'doc_ja_18_3' into doc_ja_18
noborus Mar 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .abi-compliance-history
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
# Be sure to replace "<ADD JUSTIFICATION HERE>" with details of your change and
# why it is deemed acceptable.

8d9a97e0bb6d820dac553848f0d5d8cc3f3e219d
#
# Avoid name collision with NOT NULL constraints
# 2026-02-21 12:22:08 +0100
#
# AddRelationNotNullConstraints() needs to receive the names of constraints
# already created, so that it can avoid those names when assigning names to
# not-null constraints. The purpose of this function is rather obscure, and
# furthermore it's new in 18, so I don't expect any third-party code to break.
#
# Discussion: https://postgr.es/m/19393-6a82427485a744cf@postgresql.org

33e3de6d77e87d6c3c6f8f878dd8de42d37c3b8f
#
# Add file_extend_method=posix_fallocate,write_zeros.
Expand Down
18 changes: 9 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for PostgreSQL 18.2.
# Generated by GNU Autoconf 2.69 for PostgreSQL 18.3.
#
# Report bugs to <pgsql-bugs@lists.postgresql.org>.
#
Expand Down Expand Up @@ -582,8 +582,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='PostgreSQL'
PACKAGE_TARNAME='postgresql'
PACKAGE_VERSION='18.2'
PACKAGE_STRING='PostgreSQL 18.2'
PACKAGE_VERSION='18.3'
PACKAGE_STRING='PostgreSQL 18.3'
PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
PACKAGE_URL='https://www.postgresql.org/'

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

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

Expand Down Expand Up @@ -1533,7 +1533,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of PostgreSQL 18.2:";;
short | recursive ) echo "Configuration of PostgreSQL 18.3:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1724,7 +1724,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
PostgreSQL configure 18.2
PostgreSQL configure 18.3
generated by GNU Autoconf 2.69

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

It was created by PostgreSQL $as_me 18.2, which was
It was created by PostgreSQL $as_me 18.3, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -20089,7 +20089,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by PostgreSQL $as_me 18.2, which was
This file was extended by PostgreSQL $as_me 18.3, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -20160,7 +20160,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
PostgreSQL config.status 18.2
PostgreSQL config.status 18.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dnl Read the Autoconf manual for details.
dnl
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros

AC_INIT([PostgreSQL], [18.2], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])
AC_INIT([PostgreSQL], [18.3], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])

m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
Untested combinations of 'autoconf' and PostgreSQL versions are not
Expand Down
3 changes: 2 additions & 1 deletion contrib/hstore/hstore_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ hstoreUniquePairs(Pairs *a, int32 l, int32 *buflen)
if (ptr->needfree)
{
pfree(ptr->key);
pfree(ptr->val);
if (ptr->val != NULL)
pfree(ptr->val);
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion contrib/pg_trgm/trgm_op.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ generate_trgm_only(growable_trgm_array *dst, char *str, int slen, TrgmBound **bo
{
if (bounds_allocated < dst->length)
{
bounds = repalloc0_array(bounds, TrgmBound, bounds_allocated, dst->allocated);
bounds = *bounds_p = repalloc0_array(bounds, TrgmBound, bounds_allocated, dst->allocated);
bounds_allocated = dst->allocated;
}

Expand Down
2 changes: 1 addition & 1 deletion contrib/pgcrypto/expected/pgp-pubkey-session.out
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ ff62c0a33d9143dd3f639893f47732c11c5a12c6052d1935f4d507b7ae1f76ab0e9a69b8
7305a7f7c19bd509daf4903bff614bc26d118f03e461469c72c12d3a2bb4f78e4d342ce8
487723649a01ed2b9eb11c662134502c098d55dfcd361939d8370873422c3da75a515a75
9ffedfe7df44fb3c20f81650801a30d43b5c90b98b3eee'::bytea);
ERROR: Public key too big
ERROR: Session key too big
2 changes: 1 addition & 1 deletion contrib/pgcrypto/px.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static const struct error_desc px_err_list[] = {
{PXE_PGP_UNEXPECTED_PKT, "Unexpected packet in key data"},
{PXE_PGP_MATH_FAILED, "Math operation failed"},
{PXE_PGP_SHORT_ELGAMAL_KEY, "Elgamal keys must be at least 1024 bits long"},
{PXE_PGP_KEY_TOO_BIG, "Public key too big"},
{PXE_PGP_KEY_TOO_BIG, "Session key too big"},
{PXE_PGP_UNKNOWN_PUBALGO, "Unknown public-key encryption algorithm"},
{PXE_PGP_WRONG_KEY, "Wrong key"},
{PXE_PGP_MULTIPLE_KEYS,
Expand Down
35 changes: 23 additions & 12 deletions contrib/postgres_fdw/expected/postgres_fdw.out
Original file line number Diff line number Diff line change
Expand Up @@ -6489,20 +6489,31 @@ UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END
ALTER SERVER loopback OPTIONS (DROP extensions);
INSERT INTO ft2 (c1,c2,c3)
SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id;
-- this will do a remote seqscan, causing unstable result order, so sort
EXPLAIN (verbose, costs off)
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *; -- can't be pushed down
QUERY PLAN
----------------------------------------------------------------------------------------------------------
Update on public.ft2
Output: c1, c2, c3, c4, c5, c6, c7, c8
Remote SQL: UPDATE "S 1"."T 1" SET c3 = $2 WHERE ctid = $1 RETURNING "C 1", c2, c3, c4, c5, c6, c7, c8
-> Foreign Scan on public.ft2
Output: 'bar'::text, ctid, ft2.*
Filter: (postgres_fdw_abs(ft2.c1) > 2000)
Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8, ctid FROM "S 1"."T 1" FOR UPDATE
(7 rows)
WITH cte AS (
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *
) SELECT * FROM cte ORDER BY c1; -- can't be pushed down
QUERY PLAN
------------------------------------------------------------------------------------------------------------------
Sort
Output: cte.c1, cte.c2, cte.c3, cte.c4, cte.c5, cte.c6, cte.c7, cte.c8
Sort Key: cte.c1
CTE cte
-> Update on public.ft2
Output: ft2.c1, ft2.c2, ft2.c3, ft2.c4, ft2.c5, ft2.c6, ft2.c7, ft2.c8
Remote SQL: UPDATE "S 1"."T 1" SET c3 = $2 WHERE ctid = $1 RETURNING "C 1", c2, c3, c4, c5, c6, c7, c8
-> Foreign Scan on public.ft2
Output: 'bar'::text, ft2.ctid, ft2.*
Filter: (postgres_fdw_abs(ft2.c1) > 2000)
Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8, ctid FROM "S 1"."T 1" FOR UPDATE
-> CTE Scan on cte
Output: cte.c1, cte.c2, cte.c3, cte.c4, cte.c5, cte.c6, cte.c7, cte.c8
(13 rows)

UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *;
WITH cte AS (
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *
) SELECT * FROM cte ORDER BY c1;
c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8
------+----+-----+----+----+----+------------+----
2001 | 1 | bar | | | | ft2 |
Expand Down
11 changes: 9 additions & 2 deletions contrib/postgres_fdw/sql/postgres_fdw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1608,9 +1608,16 @@ UPDATE ft2 d SET c2 = CASE WHEN random() >= 0 THEN d.c2 ELSE 0 END
ALTER SERVER loopback OPTIONS (DROP extensions);
INSERT INTO ft2 (c1,c2,c3)
SELECT id, id % 10, to_char(id, 'FM00000') FROM generate_series(2001, 2010) id;

-- this will do a remote seqscan, causing unstable result order, so sort
EXPLAIN (verbose, costs off)
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *; -- can't be pushed down
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *;
WITH cte AS (
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *
) SELECT * FROM cte ORDER BY c1; -- can't be pushed down
WITH cte AS (
UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *
) SELECT * FROM cte ORDER BY c1;

EXPLAIN (verbose, costs off)
UPDATE ft2 SET c3 = 'baz'
FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1)
Expand Down
8 changes: 5 additions & 3 deletions doc/src/sgml/ref/create_policy.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ CREATE POLICY <replaceable class="parameter">name</replaceable> ON <replaceable
<para>
<!--
If an <literal>INSERT</literal> has an <literal>ON CONFLICT DO
NOTHING/UPDATE</literal> clause, <literal>SELECT</literal>
UPDATE</literal> clause, or an <literal>ON CONFLICT DO
NOTHING</literal> clause with an arbiter index or constraint
specification, then <literal>SELECT</literal>
permissions are required on the relation, and the rows proposed for
insertion are checked using the relation's <literal>SELECT</literal>
policies. If a row proposed for insertion does not satisfy the
Expand All @@ -427,9 +429,9 @@ CREATE POLICY <replaceable class="parameter">name</replaceable> ON <replaceable
<literal>UPDATE</literal> is <emphasis>never</emphasis> silently
avoided).
-->
<literal>INSERT</literal>に<literal>ON CONFLICT DO NOTHING/UPDATE</literal>句がある場合、リレーションに対する<literal>SELECT</literal>権限が必要であり、挿入される予定の行はリレーションの<literal>SELECT</literal>ポリシーを使って検査されます。
<literal>INSERT</literal>に<literal>ON CONFLICT DO UPDATE</literal>句、あるいは競合解決インデックスや制約の指定を伴う<literal>ON CONFLICT DO NOTHING</literal>句がある場合、リレーションに対する<literal>SELECT</literal>権限が必要であり、挿入される予定の行はリレーションの<literal>SELECT</literal>ポリシーを使って検査されます。
挿入される予定の行がリレーションの<literal>SELECT</literal>ポリシーを満たさない場合、エラーが発生します(<literal>INSERT</literal>は<emphasis>決して</emphasis>暗黙的に回避されません)。
さらに、<literal>UPDATE</literal>のパスが取られた場合、更新される行と新しい更新された行はリレーションの<literal>SELECT</literal>ポリシーを使って検査され、満たされない場合はエラーが発生します(補助的な<literal>UPDATE</literal>は<emphasis>決して</emphasis>暗黙的に回避されません)。
さらに、<literal>UPDATE</literal>のパスが取られた場合、更新される行と新しく更新された行はリレーションの<literal>SELECT</literal>ポリシーを使って検査され、満たされない場合はエラーが発生します(補助的な<literal>UPDATE</literal>は<emphasis>決して</emphasis>暗黙的に回避されません)。
</para>
<para>
<!--
Expand Down
14 changes: 9 additions & 5 deletions doc/src/sgml/ref/insert.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,18 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
<literal>INSERT</literal> privilege on the listed columns.
Similarly, when <literal>ON CONFLICT DO UPDATE</literal> is specified, you
only need <literal>UPDATE</literal> privilege on the column(s) that are
listed to be updated. However, <literal>ON CONFLICT DO UPDATE</literal>
also requires <literal>SELECT</literal> privilege on any column whose
values are read in the <literal>ON CONFLICT DO UPDATE</literal>
expressions or <replaceable>condition</replaceable>.
listed to be updated. However, all forms of <literal>ON CONFLICT</literal>
also require <literal>SELECT</literal> privilege on any column whose values
are read. This includes any column mentioned in
<replaceable>conflict_target</replaceable> (including columns referred to
by the arbiter constraint), and any column mentioned in an
<literal>ON CONFLICT DO UPDATE</literal> <replaceable>expression</replaceable>,
or a <literal>WHERE</literal> clause <replaceable>condition</replaceable>.
-->
列リストを指定する場合は、列挙された列に対する<literal>INSERT</literal>権限のみが必要です。
同様に、<literal>ON CONFLICT DO UPDATE</literal>が指定されている場合、更新対象として列挙されている列についてのみ、<literal>UPDATE</literal>権限が必要です。
しかし、<literal>ON CONFLICT DO UPDATE</literal>は、値が<literal>ON CONFLICT DO UPDATE</literal>式あるいは<replaceable>condition</replaceable>で読み取られるすべての列について<literal>SELECT</literal>権限も必要です。
しかし、すべての形式の<literal>ON CONFLICT</literal>は、値が読み取られる列に対する<literal>SELECT</literal>権限も必要とします。
これには、<replaceable>conflict_target</replaceable>で言及されている列(競合解決制約で参照される列も含む)や、<literal>ON CONFLICT DO UPDATE</literal>の<replaceable>expression</replaceable>や<literal>WHERE</literal>句の<replaceable>condition</replaceable>で言及されている列が含まれます。
</para>

<para>
Expand Down
Loading
Loading