Re: pl/pgsql feature request: shorthand for argument and local variable references - Mailing list pgsql-hackers

From Joel Jacobson
Subject Re: pl/pgsql feature request: shorthand for argument and local variable references
Date
Msg-id 99319627-9d6c-47bc-801a-0f370f0f32a3@www.fastmail.com
Whole thread Raw
In response to Re: pl/pgsql feature request: shorthand for argument and local variable references  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: pl/pgsql feature request: shorthand for argument and local variable references
List pgsql-hackers
On Thu, Jan 6, 2022, at 15:05, Pavel Stehule wrote:
>>čt 6. 1. 2022 v 14:28 odesílatel Joel Jacobson <joel@compiler.org> napsal:
>>How about using the existing reserved keyword "in" followed by "." (dot) and then the function parameter name?
>>
>>This idea is based on the assumption "in." would always be a syntax error everywhere in both SQL and PL/pgSQL,
>>so if we would introduce such a syntax, no existing code could be affected, except currently invalid code.
>>
>>I wouldn't mind using "in." to refer to IN/OUT/INOUT parameters and not only IN ones, it's a minor confusion that could be >>explained in the docs.
>
>You are right, in.outvar looks messy.

I think you misunderstood what I meant, I suggested "in.outvar" would actually be OK.

> Moreover, maybe the SQL parser can have a problem with it.

How could the SQL parser have a problem with it, if "in" is currently never followed by "." (dot)?
Not an expert in the SQL parser, trying to understand why it would be a problem.

/Joel

pgsql-hackers by date:

Previous
From: Jelte Fennema
Date:
Subject: Re: [EXTERNAL] Re: PQcancel does not use tcp_user_timeout, connect_timeout and keepalive settings
Next
From: Pavel Stehule
Date:
Subject: Re: pl/pgsql feature request: shorthand for argument and local variable references