pgsql: Improve coverage of ruleutils.c for SQLValueFunctions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve coverage of ruleutils.c for SQLValueFunctions
Date: 2022-10-24 07:56:50
Message-ID: E1omsKH-000ZQ8-MM@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve coverage of ruleutils.c for SQLValueFunctions

While looking at how these are handled in the parser and the executor, I
have noticed that there is no test coverage for most of these when
reverse-engineering an expression for a SQLValueFunction node in
ruleutils.c, including how these are reparsed when included in a FROM
clause. Some hacking in this area has showed me that these could break
easily, so add some coverage to track the existing compatibility.

Extracted from a much larger patch by me.

Discussion: https://postgr.es/m/YzaG3MoryCguUOym@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2e0d80c5bb722fb49a4cdc44b0c715ec77c83f79

Modified Files
--------------
src/test/regress/expected/create_view.out | 82 ++++++++++++++++++++++++++++++-
src/test/regress/sql/create_view.sql | 33 ++++++++++++-
2 files changed, 112 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2022-10-24 10:05:10 pgsql: Fix recently added incorrect assertion
Previous Message Michael Paquier 2022-10-24 06:51:46 pgsql: Improve tab completion for ALTER STATISTICS <name> SET in psql