Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tui6b-00AvkL-Kl for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Mar 2025 01:20:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tui6Z-009KDc-9I for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Mar 2025 01:20:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tui6Y-009KDU-Uu for pgsql-hackers@lists.postgresql.org; Wed, 19 Mar 2025 01:20:22 +0000 Received: from mail-ua1-x932.google.com ([2607:f8b0:4864:20::932]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tui6V-003fNd-0Y for pgsql-hackers@postgresql.org; Wed, 19 Mar 2025 01:20:22 +0000 Received: by mail-ua1-x932.google.com with SMTP id a1e0cc1a2514c-86b9ea43955so2754432241.2 for ; Tue, 18 Mar 2025 18:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742347218; x=1742952018; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=poTDeofdPuVigNapGE948jGAhziZpKbCoifjJPr4kRA=; b=h+bSXT+gLew0mMEQbpvD8cwVa7dGj0PCBDM/Q1Dar1w5aU4CwJ1KTyQyiaPeaZ0rlQ OZpajTYONyxOJoFY2ZFL4gIB3DH1s8zXum+3SiJ/TiibqkP7QShKpahmplLk/OnJsc07 DpQl4tAizaRbQes2JpcLfaZI9ZE3kWDq6LxLkoHHsxSwGhPDyUU9PLJBei/51gn3zebm XKsdeFx1CmLiJWEKE6HAMgegXUXUH1fvhaCkePU2DKIoo+2E3ErtSNp98AoLJRcNVzJr 3ZXNmbrQ98AOHPLd9P9Fjl31cZI+AZmHl2rGTE4QLdLZTm9qHIMyVVpzX7/SmsNFC2tE ALYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742347218; x=1742952018; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=poTDeofdPuVigNapGE948jGAhziZpKbCoifjJPr4kRA=; b=Xfw6u2v7ARrkdFzt6lbgu7WWRK7ZH8TO2ZiYv6rBVFsZ3Kmw/AN0iPpDECylqrkd7K 323d0ZjUt29SXi5BtCUn9WK9m3nZpWczY8S6Cn8dsaSNMNOrQcV7kltgWeoh0kIIVy62 mdqhbGcixmw1RM9v1QKRWKm1zXPVRPuuLPV8zCiuECUBCOANnUvR6J6SY6QsCRw6rGs/ 5wgQgo3qy1/qT06EwylS8XN3Du5XJRF+XlsIaCWLNAwsIu4J8liVdf22CDZpjDShfKGl +eD6Ce5Nd/KkTqPU5SKuJRi0Oyr3spBI2Os6tP3SaokvIAqck+eXuMmxuxU1ROjzBi1j t0BQ== X-Gm-Message-State: AOJu0YzRYZbe2BAxF6ihqUCS2R0XvRuFHw5KE1XzdtwHQ74/JbsA1CgF 5iobMrBIlCJ55C0I2DSkEmyIGBN09a6luEYUAQO74beAoWhJylyZ2eGgSbb3EmkMjYzupXaHrJO t0LLCOswAIsFTGWdvg0ABarlg1bQ= X-Gm-Gg: ASbGnctAWoxmCosnkreqC3W1GcAbyFcqoFgqGd/xeTQ5bENwfAhAJ44Ehz8vFc8O/35 DtmQBVrLzxcgUZrbbhQy19AUADoTycpzFGyG7UTAHXPnQRiwzEBJI2Dy1tYufN7IhI5it8DjPdf gHqx6zCiZwlWxSwuD8eKGZlqY8+hkB2ODF4lL1HKETzngKlRK7ADpL614= X-Google-Smtp-Source: AGHT+IGh7P/HdHarJIxpKELAvXybr7Bv/LJUTcZncmcd2cNOb9elRCUvt4iRltDq/Wf5jFd2ajQRmY076ai715P37c8= X-Received: by 2002:a05:6102:5718:b0:4c4:e21f:646b with SMTP id ada2fe7eead31-4c4ec625cc7mr686140137.5.1742347218025; Tue, 18 Mar 2025 18:20:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: jian he Date: Wed, 19 Mar 2025 09:19:42 +0800 X-Gm-Features: AQ5f1Jraq1SDMHDLepbKaMzvKq1oFdPyddyJPSmRpozapNc1Z4V-1J1FdzGLKtY Message-ID: Subject: Re: add function argument name to substring and substr To: "David G. Johnston" Cc: PostgreSQL-development Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Mar 19, 2025 at 8:19=E2=80=AFAM David G. Johnston wrote: > > The vast majority of examples throughout the manual use traditional funct= ion call syntax func_name(arg1, arg2, etc.); I'd rather keep with convent= ion than start to scatter about alternative syntax choices just to give the= random reader who happens upon this fairly esoteric part of the manual the= benefit of seeing their options. If that is a goal, then I'd suggest spen= ding some time in our Tutorial adding some more examples with these alterna= tive forms to people looking to be exposed to new things in the place they'= d go to look for them. They probably won't learn about them from the Synta= x section. > > On the plus side, I agree now we should add: > substring(string text, pattern text[, escape-character text]) > to Table 9.10 > in Table Table 9.9 we have ``` substring ( string text FROM pattern text ) =E2=86=92 text Extracts the first substring matching POSIX regular expression; see Section 9.7.3. substring('Thomas' from '...$') =E2=86=92 mas ``` can we change to substring ( string text FROM pattern text ) =E2=86=92 text substring ( string text, pattern text ) =E2=86=92 text Extracts the first substring matching POSIX regular expression; the second format is not standardized. see Section 9.7.3. substring('Thomas' from '...$') =E2=86=92 mas if we add to ``substring ( string text, pattern text ) =E2=86=92 text`` Table 9.10, then maybe it feels like duplication? (same function in Table 9.9, Table 9.10, then we also need some words saying that they are the same) I do realized we have brief explanation about Table 9.9 and Table 9.10 in second paragraph of https://www.postgresql.org/docs/current/functions-string.html