pgsql: Fix a couple of problems in pg_get_statisticsextdef

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix a couple of problems in pg_get_statisticsextdef
Date: 2017-03-27 04:04:41
Message-ID: E1csLtZ-0002vy-LI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix a couple of problems in pg_get_statisticsextdef

There was a thinko whereby we tested the wrong tuple after fetching it
from cache; avoid that by using generate_relation_name instead, which is
simpler. Also, the statistics name was not qualified, so add that. (It
could be argued that qualification should be conditional on the schema
not being on search path. We can add that later, but at least this form
is correct.)

Author: David Rowley, Álvaro Herrera
Discussion: https://postgr.es/m/CAKJS1f8RjLeVZJ2+93pdQGuZJeBF-ifsHaFMR-q-6-Z0qxA8cA@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/2c3e47527a6f53cd1d98887fdb9e770c118954ca

Modified Files
--------------
src/backend/utils/adt/ruleutils.c | 20 +++++---------------
src/test/regress/expected/rules.out | 6 ++++++
src/test/regress/expected/stats_ext.out | 7 +++++++
src/test/regress/sql/rules.sql | 1 +
src/test/regress/sql/stats_ext.sql | 4 ++++
5 files changed, 23 insertions(+), 15 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Gierth 2017-03-27 04:37:08 Re: pgsql: Support hashed aggregation with grouping sets.
Previous Message Andrew Gierth 2017-03-27 03:47:00 pgsql: Support hashed aggregation with grouping sets.