pgsql: Improve error checking of CREATE COLLATION options.

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve error checking of CREATE COLLATION options.
Date: 2021-07-18 10:11:11
Message-ID: E1m53lP-0006SR-B8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve error checking of CREATE COLLATION options.

Check for conflicting or redundant options, as we do for most other
commands. Specifying any option more than once is at best redundant,
and quite likely indicates a bug in the user's code.

While at it, improve the error for conflicting locale options by
adding detail text (the same as for CREATE DATABASE).

Bharath Rupireddy, reviewed by Vignesh C. Some additional hacking by
me.

Discussion: https://postgr.es/m/CALj2ACWtL6fTLdyF4R_YkPtf1YEDb6FUoD5DGAki3rpD+sWqiA@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/commands/collationcmds.c | 17 +++++++++----
src/test/regress/expected/collate.out | 47 +++++++++++++++++++++++++++++++++++
src/test/regress/sql/collate.sql | 21 ++++++++++++++++
3 files changed, 80 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2021-07-18 18:07:52 pgsql: Support for unnest(multirange)
Previous Message Alvaro Herrera 2021-07-17 17:35:39 pgsql: Make new replication slot test code less racy