postgresql/src
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
..
backend Disallow renaming a rule to "_RETURN". 2026-07-04 11:34:26 -04:00
bin psql: Fix \df tab completion for procedures 2026-07-03 13:48:59 +09:00
common Fix mismatched deallocation functions 2026-07-01 13:50:08 +02:00
fe_utils Fix mismatched deallocation functions 2026-07-01 13:50:08 +02:00
include Prevent access to other sessions' empty temp tables 2026-07-03 18:02:14 +03:00
interfaces Fix tracing of BackendKeyData and CancelRequest 2026-07-03 14:57:35 +03:00
makefiles Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
pl plpython: Fix NULL pointer dereferences for broken sequence and mapping objects 2026-06-29 11:38:39 +09:00
port Use C11 alignas instead of pg_attribute_aligned 2026-07-01 08:36:43 +02:00
template Switch the semaphore API on Solaris to unnamed POSIX. 2026-03-14 14:10:32 -04:00
test Disallow renaming a rule to "_RETURN". 2026-07-04 11:34:26 -04:00
timezone Fix macro-redefinition warning introduced by aeb07c55f. 2026-07-01 13:44:45 -04:00
tools Allow logical replication conflicts to be logged to a table. 2026-07-02 08:26:07 +05:30
tutorial Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00
.gitignore
DEVELOPERS
Makefile Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
Makefile.global.in Update Unicode data to CLDR 48.2 2026-04-13 11:13:36 +02:00
Makefile.shlib Restore AIX support. 2026-02-23 13:34:22 -05:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
nls-global.mk Fix update-po for the PGXS case 2025-10-16 20:21:05 +02:00