Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNzHu-00040g-3l for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Mar 2021 14:42:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lNzHt-0003I1-22 for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Mar 2021 14:42:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNzHs-0003Gz-Ge for pgsql-hackers@lists.postgresql.org; Sun, 21 Mar 2021 14:42:40 +0000 Received: from anastigmatix.net ([68.171.219.55]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNzHq-0005vw-2M for pgsql-hackers@lists.postgresql.org; Sun, 21 Mar 2021 14:42:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8X8OTGEIZd+WNZRWPCDjMWSZZfbl5Hy2UshbDTLrDxo=; b=WsKwe1q8QvGbJnNYYcAVkWwUZz Ei/ledwGVDx1Z+eYEsyWTL/EJzyh2UB6ql67yekStUXoAiRbpU1xRwfMENJ02RxFpSc/BeF6rUBRs UUe7QZBpooXZB5H6oOKxcp4ZogbTUNZ0GM+GejrL0ycGWZk2Gu60n5c9h5k/uBoQ2MEpOvhWHdSSh voLLww3HokV0Df+bCxY684K3c+CSvSJvcF+hnNWwtOS8W0xMADkuKwGPuKA5xFUHF++0kP6QB/mIS VUkpX97kVMVA4lOLelDX8ZUeyIxYlFcrawtze5f1owSjyMkDjBetlKaWb9QUrLWQ+ZE1uv+o96FqO dLKRydnA==; Received: from [184.19.31.139] (port=53704) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1lNzHn-005ZLz-Mk; Sun, 21 Mar 2021 10:42:36 -0400 Subject: Re: [PATCH] proposal for regexp_count, regexp_instr, regexp_substr and regexp_replace To: Gilles Darold , er@xs4all.nl, pgsql-hackers@lists.postgresql.org References: <2292303d-766d-2172-2942-b076a3bb6505@darold.net> <2122577845.234888.1616324857283@webmailclassic.xs4all.nl> <9f91e4e7-19c8-d8e0-6955-fefaebd4c8fe@darold.net> From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <60575B5A.4080807@anastigmatix.net> Date: Sun, 21 Mar 2021 10:42:34 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <9f91e4e7-19c8-d8e0-6955-fefaebd4c8fe@darold.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 03/21/21 09:19, Gilles Darold wrote: >>> On 2021.03.20. 19:48 Gilles Darold wrote: >>> >>> This is a new version of the patch that now implements all the XQUERY >>> regexp functions as described in the standard, minus the differences of >>> PostgerSQL regular expression explain in [1]. >>> >>> The standard SQL describe functions like_regex(), occurrences_regex(), >>> position_regex(), substring_regex() and translate_regex() which >>> correspond to the commonly named functions regexp_like(), >>> regexp_count(), regexp_instr(), regexp_substr() and regexp_replace() as >>> reported by Chapman Flack in [2]. All these function are implemented in >>> [v2-0001-xquery-regexp-functions.patch] I quickly looked over this patch preparing to object if it actually purported to implement the ISO foo_regex() named functions without the ISO semantics, but a quick grep reassured me that it doesn't implement any of those functions. It only supplies functions in the alternative, apparently common de facto naming scheme regexp_foo(). To be clear, I think that's the right call. I do not think it would be a good idea to supply functions that have the ISO names but not the specified regex dialect. A set of functions analogous to the ISO ones but differently named and with a different regex dialect seems fine to me, especially if these different names are de facto common, and as far as I can tell, that is what this patch provides. So I have no objection to that. :) It might then be fair to say that the /description/ of the patch as implementing the XQuery-based foo_regex functions isn't quite right, or at least carries a risk of jarring some readers into hasty double-takes on Sunday mornings before coffee. It might be clearer to just mention the close correspondence between the functions in this differently-named set and the corresponding ISO ones. If this turns out to be a case of "attached the wrong patch, here's the one that does implement foo_regex functions!" then I reserve an objection to that. :) Regards, -Chap