pgsql: Print out error position for CREATE DOMAIN

Lists: pgsql-committers
From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Print out error position for CREATE DOMAIN
Date: 2024-12-16 05:52:25
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers

Print out error position for CREATE DOMAIN

This is simply done by pushing down the ParseState available in
ProcessUtility() to DefineDomain(), giving more information about the
position of an error when running a CREATE DOMAIN query.

Most of the queries impacted by this change have been added previously
in 0172b4c9449e.

Author: Kirill Reshke, Jian He
Reviewed-by: Álvaro Herrera, Tom Lane, Michael Paquier
Discussion: https://postgr.es/m/CALdSSPhqfvKbDwqJaY=yEePi_aq61GmMpW88i6ZH7CMG_2Z4Cg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/39240bcad56dc51a7896d04a1e066efcf988b58f

Modified Files
--------------
src/backend/commands/typecmds.c | 58 +++++++++++++---------
src/backend/tcop/utility.c | 2 +-
src/include/commands/typecmds.h | 2 +-
src/test/regress/expected/collate.icu.utf8.out | 2 +
src/test/regress/expected/collate.linux.utf8.out | 2 +
src/test/regress/expected/collate.out | 2 +
.../regress/expected/collate.windows.win1252.out | 2 +
src/test/regress/expected/domain.out | 26 ++++++++++
8 files changed, 70 insertions(+), 26 deletions(-)