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 1sQTQ7-00A02V-Du for pgsql-general@arkaria.postgresql.org; Sun, 07 Jul 2024 15:03:19 +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 1sQTQ6-00DDF9-3z for pgsql-general@arkaria.postgresql.org; Sun, 07 Jul 2024 15:03:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sQTQ5-00DDF1-LS for pgsql-general@lists.postgresql.org; Sun, 07 Jul 2024 15:03:17 +0000 Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sQTQ2-000ryc-Qr for pgsql-general@postgresql.org; Sun, 07 Jul 2024 15:03:16 +0000 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-64b417e1511so29070127b3.3 for ; Sun, 07 Jul 2024 08:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720364594; x=1720969394; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0dEkW/xBLXpHZqQ0HFrOzLiTDadzWGY6cTyvKMNFf1E=; b=cBEL4BP2dOWmznzeuU56yKohmWsJYSSY8lsn70DLN+J5dJDiJwhbIt7q3jjMZsviaP DZAlFh6cs8P0jpH8Y7SxYoE6FyQEUwlo6OYxo2hklKLMHEqi9xNICXEtAxXISOszDNS3 09wOwsqNbY4Gq37Qb97B7a6a0eDdl0aY61RtY0xkAE+0Dc6DdvWnm/OvcXDPv0fchZhn eZDQI1nxsB9Chg7VXLRj31S2WtuC/J5+efX8HMzkD9z5KgP+V8EkJBOYhNDDOGWv+Hk3 Lj4DBNXi4LN8mB3UqLAVmmVeHkkZ2eKCsx5iIlN/ckGEIDwAeEuMktjxeXw0ZYJBRgIF 4WsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720364594; x=1720969394; h=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=0dEkW/xBLXpHZqQ0HFrOzLiTDadzWGY6cTyvKMNFf1E=; b=ZXLBCX0ru1CnEh6NBAL/NFsAO3H7x67goeO6GttIlD/p72MH96tD/Z47Uto41k60gu jheBSLzRDeS6YF9rC7Y2eFiKjSkEW7b15Y7lNsfMzt+s6cX5tb3qvYXBYn9eK1Y/R9i7 Pc+soTYrcC8eqXkWrT+hiQf2XI9J8YWobNGqRLh8XEuFYVLztAdii8LsQg04qjbT11On wMO3AhzKiN9evTly0D5fBZ/vQI/1hm+5NlXiE3qXIITHW0JPvm1i3WzcoVB06ImF17o3 RSUjQeUHfFtJjrVTIY/fMk4h5VpZ7ZxhdLcbdzFk17Kv8PWOD2J3wXeSDI/PIa/lgSt7 H+Ag== X-Forwarded-Encrypted: i=1; AJvYcCXm6iJ0qjLMu38wETWfPZIDsqu9K8fJZ6JlPkbmltuVTt/TQMaGv7rf6SdhI/CNGBCAcSqBkOfUpivvdO+waQNrihVmmCkZoQ889z6i X-Gm-Message-State: AOJu0Yxtw3IQjgXMtSlndFQplDYYt9O/n3ycfNeFGE3I36Ui6el4KxBX POX8foq5GsOBWmyu3f3iBOdhagqG3P08ELHGQw4asuM2ooFjeWhM5TObbOuORrlHcfiwlHVLQkC fZx5nqWmCclylOgVEbXxFMDicetw= X-Google-Smtp-Source: AGHT+IEZeVD5y3E/2krzvTe1AenosLs/9tYMUKnBSQccaSNdggJ9PULiIAGAjmHwJ9LtHXKK6UtdmFYGpd34jrfz9d8= X-Received: by 2002:a05:690c:700c:b0:62f:37c9:77bc with SMTP id 00721157ae682-652d2ddeff1mr117920157b3.0.1720364594027; Sun, 07 Jul 2024 08:03:14 -0700 (PDT) MIME-Version: 1.0 References: <577338.1720304029@sss.pgh.pa.us> <3f8781c5-d625-4f24-b96d-56a45a0dd257@aklaver.com> In-Reply-To: From: Pavel Stehule Date: Sun, 7 Jul 2024 17:02:37 +0200 Message-ID: Subject: Re: Declaring a field that is also an out parameter in a function To: Adrian Klaver Cc: Michael Nolan , Tom Lane , "pgsql-general@postgresql.org" Content-Type: multipart/alternative; boundary="00000000000082e815061ca9987f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000082e815061ca9987f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ne 7. 7. 2024 v 17:00 odes=C3=ADlatel Adrian Klaver napsal: > On 7/7/24 07:53, Pavel Stehule wrote: > > > > > > ne 7. 7. 2024 v 16:48 odes=C3=ADlatel Adrian Klaver > > > napsal: > > > > On 7/7/24 07:42, Pavel Stehule wrote: > > > I'm not sure why there's a warning about using an alias. > > 43.3.1 says > > > to use them for improved readability. > > > > > > > > > it is obsolete - aliases were used when Postgres doesn't support > > named > > > arguments. > > > > Is that was what it was complaining about or the fact they where > > declared and never used? > > > > > > I am not sure if I understand the question. My reply was related to > > generic usage of aliases. > > The conversation was: > > Mike Nolan > > "I'm not sure why there's a warning about using an alias. 43.3.1 says > to use them for improved readability." > > Pavel Stehule > > "it is obsolete - aliases were used when Postgres doesn't support named > arguments." > > I was just trying to confirm that the warning was not for ALIAS being > declared. That it was for what you state below. > > ok > > > > > Report from plpgsql_check was correct - and related variables were not > > used. > > > > > > > > > > I don't know any good reason why one variable can use more than > > one name. > > > > Section 43.3.2. ALIAS provides the pros/cons. > > > > > > > > There can be an exception when argument names are very long, but > > > generally they are not used. > > > > > > > > > > > > Mike Nolan > > > > > > > -- > > Adrian Klaver > > adrian.klaver@aklaver.com > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > > --00000000000082e815061ca9987f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
ne 7. 7. 2024 v=C2=A017:00 odes=C3=AD= latel Adrian Klaver <adrian= .klaver@aklaver.com> napsal:
On 7/7/24 07:53, Pavel Stehule wrote:
>
>
> ne 7. 7. 2024 v=C2=A016:48 odes=C3=ADlatel Adrian Klaver
> <adr= ian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> napsal:
>
>=C2=A0 =C2=A0 =C2=A0On 7/7/24 07:42, Pavel Stehule wrote:
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0I'm not sure why there= 's a warning about using an alias.
>=C2=A0 =C2=A0 =C2=A043.3.1 says
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0to use them for improved r= eadability.
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > it is obsolete - aliases were used when Postg= res doesn't support
>=C2=A0 =C2=A0 =C2=A0named
>=C2=A0 =C2=A0 =C2=A0 > arguments.
>
>=C2=A0 =C2=A0 =C2=A0Is that was what it was complaining about or the fa= ct they where
>=C2=A0 =C2=A0 =C2=A0declared and never used?
>
>
> I am not sure if I understand the question. My=C2=A0 reply was related= to
> generic usage of aliases.

The conversation was:

Mike Nolan

"I'm not sure why there's a warning about using an alias. 43.3= .1 says
to use them for improved readability."

Pavel Stehule

"it is obsolete - aliases were used when Postgres doesn't support = named
arguments."

I was just trying to confirm that the warning was not for ALIAS being
declared. That it was for what you state below.


ok

=C2=A0
=

>
> Report from plpgsql_check was correct - and related variables were not=
> used.
>
>
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > I=C2=A0 don't know any good reason why on= e variable can use more than
>=C2=A0 =C2=A0 =C2=A0one name.
>
>=C2=A0 =C2=A0 =C2=A0Section 43.3.2. ALIAS provides the pros/cons.
>
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > There can be an exception when argument names= are very long, but
>=C2=A0 =C2=A0 =C2=A0 > generally they are not used.
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0Mike Nolan
>=C2=A0 =C2=A0 =C2=A0 >
>
>=C2=A0 =C2=A0 =C2=A0--
>=C2=A0 =C2=A0 =C2=A0Adrian Klaver
>=C2=A0 =C2=A0 =C2=A0adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com><= br> >

--
Adrian Klaver
adrian.klave= r@aklaver.com

--00000000000082e815061ca9987f--