pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jian he <jian.universality@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: Dian Fay <di@nmfay.com>
Cc: Jim Nasby <jim.nasby@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Chapman Flack <jcflack@acm.org>
Subject: Re: add function argument names to regex* functions.
Date: Thu, 18 Jul 2024 17:48:24 -0400
Message-ID: <3999490.1721339304@sss.pgh.pa.us> (raw)
In-Reply-To: <CACJufxGJavz+UTJLBw=qTMZywG7E24oKNxp5B4+4uRHmXCW8Og@mail.gmail.com>
References: <CACJufxG3NFKKsh6x4fRLv8h3V-HvN4W5dA=zNKMxsNcDwOKang@mail.gmail.com>
	<b550243f-1bd2-4119-82e9-0f0abccc6434@eisentraut.org>
	<CACJufxHeyc34PMx6OnWb-xoaMtj1Yoax1rM+71zkwCynvmVwdg@mail.gmail.com>
	<CY3KI01TXYMD.3Q41WQ6U0NFEO@nmfay.com>
	<0eb3a5d7-75d8-4da5-9c88-a93deccdaa03@gmail.com>
	<CY5G4TAMVX32.23TH6LFF93ATZ@nmfay.com>
	<75129a34-14da-48aa-9906-42062fe78664@gmail.com>
	<CACJufxHBx+AHGVJocDSD-PbX0z32vJR9eEUhB+vsJHbjwnXNcg@mail.gmail.com>
	<CY8WQVZ0PK1B.19QRO61WBALCP@nmfay.com>
	<CACJufxHTw22kOmmDBpubmju9bfFhonEekwf0s6LGvysbnWEg9Q@mail.gmail.com>
	<CY9RIU0NZPAE.XZOBLKSFPZZB@nmfay.com>
	<CACJufxHqg0xqq=OdfN8Pf0C_hvEf0OSXik_3Yr0-QTAFUuHG=Q@mail.gmail.com>
	<f2b5ab0d-324c-4ba9-959e-67420bac7738@eisentraut.org>
	<CACJufxHZuQF8RkHHd83sqAeFvWfbvBysUxzRarAOeYuCi=tTmg@mail.gmail.com>
	<1763682.1712090733@sss.pgh.pa.us>
	<CACJufxGpgsQgnRvcPLczTV1Ak=JS0LmHxWe4q4dv6Qd1tRkQ9A@mail.gmail.com>
	<CA+TgmoZYDN7BEQzpanKVvjEK48cn7Rq95_jjn=wTe2gM4-2J5w@mail.gmail.com>
	<1816377.1715800208@sss.pgh.p! a.us>
	<CACJufxGJavz+UTJLBw=qTMZywG7E24oKNxp5B4+4uRHmXCW8Og@mail.gmail.com>

jian he <jian.universality@gmail.com> writes:
> [ v5-0001-add-regex-functions-argument-names-to-pg_proc.patch ]

I'm not sure whether we've bikeshedded this to death yet, but
personally I'm content with the naming choices here (which basically
are those already shown in table 9.10).  However, while looking
at the patch I noticed a couple of issues, one small, the other
a bit bigger.

The small issue is that table 9.10 offers this syntax diagram
for regexp_replace:

regexp_replace ( string text, pattern text, replacement text [, start integer ] [, flags text ] ) → text

This implies that it's valid to write

	regexp_replace (string, pattern, replacement, start, flags)

but it is not: we have no function matching that signature.  I'm not
in a hurry to add one, either, for fear of ambiguity against the other
regexp_replace signature.  I think this needs to be broken into two
syntax diagrams:

regexp_replace ( string text, pattern text, replacement text [, start integer ] ) → text
regexp_replace ( string text, pattern text, replacement text [, flags text ] ) → text

The larger issue is that contrib/citext offers versions of some of
these functions that are meant to be drop-in replacements using
citext input.  Hence, we need to add the same parameter names to
those functions, or they'll fail to replace some calls.

			regards, tom lane





view thread (48+ messages)  latest in thread

Message-ID: <3999490.1721339304@sss.pgh.pa.us>
Permalink:  ../3999490.1721339304@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3999490.1721339304@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jian.universality@gmail.com, robertmhaas@gmail.com, peter@eisentraut.org, di@nmfay.com, jim.nasby@gmail.com, jcflack@acm.org
  Subject: Re: add function argument names to regex* functions.
  In-Reply-To: <3999490.1721339304@sss.pgh.pa.us>
  References: <CACJufxG3NFKKsh6x4fRLv8h3V-HvN4W5dA=zNKMxsNcDwOKang@mail.gmail.com> <CY3KI01TXYMD.3Q41WQ6U0NFEO@nmfay.com> <0eb3a5d7-75d8-4da5-9c88-a93deccdaa03@gmail.com> <CY5G4TAMVX32.23TH6LFF93ATZ@nmfay.com> <75129a34-14da-48aa-9906-42062fe78664@gmail.com> <CACJufxHBx+AHGVJocDSD-PbX0z32vJR9eEUhB+vsJHbjwnXNcg@mail.gmail.com> <CY8WQVZ0PK1B.19QRO61WBALCP@nmfay.com> <CACJufxHTw22kOmmDBpubmju9bfFhonEekwf0s6LGvysbnWEg9Q@mail.gmail.com> <CY9RIU0NZPAE.XZOBLKSFPZZB@nmfay.com> <CACJufxHqg0xqq=OdfN8Pf0C_hvEf0OSXik_3Yr0-QTAFUuHG=Q@mail.gmail.com> <f2b5ab0d-324c-4ba9-959e-67420bac7738@eisentraut.org> <CACJufxHZuQF8RkHHd83sqAeFvWfbvBysUxzRarAOeYuCi=tTmg@mail.gmail.com> <1763682.1712090733@sss.pgh.pa.us> <CACJufxGpgsQgnRvcPLczTV1Ak=JS0LmHxWe4q4dv6Qd1tRkQ9A@mail.gmail.com> <CA+TgmoZYDN7BEQzpanKVvjEK48cn7Rq95_jjn=wTe2gM4-2J5w@mail.gmail.com> <CACJufxGJavz+UTJLBw=qTMZywG7E24oKNxp5B4+4uRHmXCW8Og@mail.gmail.com> <3999490.1721339304@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox