pgsql: Properly mark pg_stat_get_subscription() as returning a set.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Properly mark pg_stat_get_subscription() as returning a set.
Date: 2021-03-08 23:55:05
Message-ID: E1lJPiL-0004JB-Mr@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Properly mark pg_stat_get_subscription() as returning a set.

The initial catalog data for this function failed to set proretset
or provide a prorows estimate. It accidentally worked anyway when
invoked in the FROM clause, because the executor isn't too picky
about this; but the planner didn't expect the function to return
multiple rows, which could lead to bad plans. Also the function
would fail if invoked in the SELECT list.

We can't easily back-patch this fix, but fortunately the bug's
consequences aren't awful in most cases. Getting this right is
mainly an exercise in future-proofing.

Discussion: https://postgr.es/m/1636062.1615141782@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/fed10d4eec79242688382d03ddca82007160ee6f

Modified Files
--------------
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2021-03-09 02:18:52 pgsql: Remove support for SSL compression
Previous Message Tom Lane 2021-03-08 23:22:11 pgsql: Validate the OID argument of pg_import_system_collations().