postgresql/src/test
Tom Lane a8c2547eaa Disallow renaming a rule to "_RETURN".
ON SELECT rules must be named "_RETURN", while other kinds of rules
must not be; this ancient restriction is depended on by various client
code.  We successfully enforced this convention in most places, but
ALTER RULE allowed renaming a non-SELECT rule to "_RETURN".  Notably,
that would break dump/restore, since the eventual CREATE RULE command
would reject the name.

While at it, remove DefineQueryRewrite's hack to substitute "_RETURN"
for the convention that was used before 7.3.  We dropped other
server-side code that supported restoring pre-7.3 dumps some time ago
(notably in e58a59975 and nearby commits), but this bit was missed.

Bug: #19543
Reported-by: Adam Pickering <adamkpickering@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19543-461228e77f3b32fc@postgresql.org
Backpatch-through: 14
2026-07-04 11:34:26 -04:00
..
authentication Warn on password auth with MD5-encrypted passwords 2026-07-01 20:57:28 +09:00
examples Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
icu Update copyright for 2026 2026-01-01 13:24:10 -05:00
isolation Fix mismatched deallocation functions 2026-07-01 13:50:08 +02:00
kerberos Update copyright for 2026 2026-01-01 13:24:10 -05:00
ldap Update copyright for 2026 2026-01-01 13:24:10 -05:00
locale Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00
mb Remove MULE_INTERNAL encoding. 2026-04-08 17:40:06 +12:00
modules Prevent access to other sessions' empty temp tables 2026-07-03 18:02:14 +03:00
perl Adjust cross-version upgrade tests for seg_out() fix 2026-06-12 18:05:25 -04:00
postmaster Pre-beta mechanical code beautification, step 2: run pgperltidy. 2026-05-13 10:37:42 -04:00
recovery Fix unlogged sequence corruption after standby promotion 2026-06-30 08:48:47 +09:00
regress Disallow renaming a rule to "_RETURN". 2026-07-04 11:34:26 -04:00
ssl Run pgperltidy 2026-06-29 15:27:44 -04:00
subscription Allow logical replication conflicts to be logged to a table. 2026-07-02 08:26:07 +05:30
Makefile Split some long Makefile lists 2025-12-28 09:17:42 +09:00
meson.build Revert "Add built-in fuzzing harnesses for security testing." 2026-04-10 09:53:58 -04:00
README

PostgreSQL tests
================

This directory contains a variety of test infrastructure as well as some of the
tests in PostgreSQL. Not all tests are here -- in particular, there are more in
individual contrib/ modules and in src/bin.

Not all these tests get run by "make check". Check src/test/Makefile to see
which tests get run automatically.

authentication/
  Tests for authentication (but see also below)

examples/
  Demonstration programs for libpq that double as regression tests via
  "make check"

isolation/
  Tests for concurrent behavior at the SQL level

kerberos/
  Tests for Kerberos/GSSAPI authentication and encryption

ldap/
  Tests for LDAP-based authentication

locale/
  Sanity checks for locale data, encodings, etc

mb/
  Tests for multibyte encoding (UTF-8) support

modules/
  Extensions used only or mainly for test purposes, generally not suitable
  for installing in production databases

perl/
  Infrastructure for Perl-based TAP tests

recovery/
  Test suite for recovery and replication

regress/
  PostgreSQL's main regression test suite, pg_regress

ssl/
  Tests to exercise and verify SSL certificate handling

subscription/
  Tests for logical replication