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 1sQTHG-009zSd-5S for pgsql-general@arkaria.postgresql.org; Sun, 07 Jul 2024 14:54:10 +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 1sQTHE-00D1k1-Dp for pgsql-general@arkaria.postgresql.org; Sun, 07 Jul 2024 14:54:08 +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 1sQTHE-00D1hi-2C for pgsql-general@lists.postgresql.org; Sun, 07 Jul 2024 14:54:08 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sQTH7-000rty-Cd for pgsql-general@postgresql.org; Sun, 07 Jul 2024 14:54:06 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-65651296d91so5019007b3.3 for ; Sun, 07 Jul 2024 07:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720364040; x=1720968840; 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=WYjSgV3yJ3dpzqec2y9PAdry+7nzQxGUwJR34yi9jZY=; b=YTtsrDksiWJUzr0p9vT8jzyNx0v9Dox60F2rHnZr7R2S/95HJ6Zp+q0bU94m1oNAhB Sw2Lt5WmMTTDYpSxAzYY/XWyMtYrMO5u8ldwfE1FmVoVL5TiqAJUvOH4+foT4K1z2z1r u3grPvUcgeFxsTbrMfzLe0XuYeiY9UTOMs5cgPR/zwIYjcE62VLuArk0AdC0r0qcwMUw lCT96jhuULOC57VGt+gqikxfPFNQK4xIIFxWqOq/jlRVGd/Ots0lfYVcZSqQOQbAcsjL xDg/yxyvI3g+HZFyF/VPGcj8e33JtFdLPmmSP9iOvwUP9MCaLxAsHfOQ+AcQQ68L7BpY zJTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720364040; x=1720968840; 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=WYjSgV3yJ3dpzqec2y9PAdry+7nzQxGUwJR34yi9jZY=; b=siwRHCaK0i7y9jay9XXEywkEU4sIlcLZ6/PuarglpwhMPdBrd5XgjFFRDoT0XTSz1u 8zodiq2aU72jeJ0xkLZmf1WzW9X9FXBT133TgDhCQ9LBeznt8H/17GkQ0rTreS5MPKPS et1KfabofwnPCXErTwUTd3EVNJ2VO63PEACSZeeB5VD/Vba4CwLjmhlV5GUYeyMIWWg5 9yGCHWMc6SFzZzxDZOMdjZ8F2XTsaW+6uuWpBRsMDGPKDHzCc4q9sE1I3IvrmDmPCJuw r3ENH5DiW5Ce5ALUrpWxyxEhaeCXMKopuGp7fBSXj4z3MAjKfYGvE4N4r7XovsaOHnwY 0A2g== X-Forwarded-Encrypted: i=1; AJvYcCV6z48oeTPrubd60XrAOtUpHLPdU94b1QZQ3ayx/OTMIQLyuXUFNlrUzP+y51HSry19MYN8LDCJ1UuiHkieb7wJ/G4gSd9+giYIr47b X-Gm-Message-State: AOJu0YyFy1/weHtlqlI0s61kDVKMoUPM2vsYbXJAVSrxy0fHnH+BMzn+ u2MU1i0hXLOB2YR3zImTkP/2wwycBh/HuobTtMlhxNaPzkHGqYSXNvwEoAuAbedPkqBkZFYDm/y bPsH0FwcZbGT1ZpwZxUAJvI2VWKM= X-Google-Smtp-Source: AGHT+IEF55ftKQVStzw0VOf8mwuy37RkyxqFP9MC+Fd3bFj7uqe7dHIpqDFIoJ3miEh73ZUCJ+Dc3aE2WFv4h9DGgtM= X-Received: by 2002:a05:690c:986:b0:63b:d711:f06d with SMTP id 00721157ae682-652d7b5c8d9mr88267817b3.33.1720364040349; Sun, 07 Jul 2024 07:54:00 -0700 (PDT) MIME-Version: 1.0 References: <577338.1720304029@sss.pgh.pa.us> <3f8781c5-d625-4f24-b96d-56a45a0dd257@aklaver.com> In-Reply-To: <3f8781c5-d625-4f24-b96d-56a45a0dd257@aklaver.com> From: Pavel Stehule Date: Sun, 7 Jul 2024 16:53:24 +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="000000000000826d3f061ca97775" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000826d3f061ca97775 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 say= s > > 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. 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 > > --000000000000826d3f061ca97775 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
ne 7. 7. 2024 v=C2=A016:48 odes=C3=AD= latel Adrian Klaver <adrian= .klaver@aklaver.com> napsal:
On 7/7/24 07:42, Pavel Stehule wrote:
>=C2=A0 =C2=A0 =C2=A0I'm not sure why there's a warning about us= ing an alias. 43.3.1 says
>=C2=A0 =C2=A0 =C2=A0to use them for improved readability.
>
>
> it is obsolete - aliases were used when Postgres doesn't support n= amed
> 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=C2=A0 reply was related to generic usage o= f aliases.

Report from plpgsql_check was correct -= and related variables were not used.


>
> I=C2=A0 don't know any good reason why one variable can use more t= han 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.
>
>
>
>=C2=A0 =C2=A0 =C2=A0Mike Nolan
>

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

--000000000000826d3f061ca97775--