Re: CREATE COLLATION - check for duplicate options and error out if found one

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-31T14:10:19Z
Lists: pgsql-hackers
On Sat, May 29, 2021 at 9:20 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> On Sat, May 29, 2021 at 9:08 PM vignesh C <vignesh21@gmail.com> wrote:
> > One minor comment:
> > You can remove the brackets around errcode, You could change:
> > + if (localeEl)
> > + ereport(ERROR,
> > + (errcode(ERRCODE_SYNTAX_ERROR),
> > + errmsg("option \"%s\" specified more than once", defel->defname),
> > + parser_errposition(pstate, defel->location)));
> > to:
> > + if (localeEl)
> > + ereport(ERROR,
> > + errcode(ERRCODE_SYNTAX_ERROR),
> > + errmsg("option \"%s\" specified more than once", defel->defname),
> > + parser_errposition(pstate, defel->location));
>
> Thanks. PSA v3 patch.

Thanks for the updated patch, the changes look good to me.

Regards,
Vignesh



Commits

  1. Improve error checking of CREATE COLLATION options.