Re: Variable substitution in psql backtick expansion

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Daniel Verite <daniel(at)manitou-mail(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Variable substitution in psql backtick expansion
Date: 2017-04-11 13:50:34
Message-ID: CADkLM=fKTp39o1HXk9Or_0LWb=+zarKuF3ja08EZEbzcQJ_9yg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 11, 2017 at 2:56 AM, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:

>
> Hello Pavel,
>
> I think so some local expression evaluation could be - but it should not be
>> placed in \if statement
>>
>
> Why?
>
> \expr issupported :VERSION_NUM >= 10000
>>
>
> Hmmm. Although I do not buy this, it could work as a replacement for \set
> which it seems cannot be upgraded because some people may rely on it to
> just store whatever comes after it in a variable.
>

I have no strong opinion on how expressive expressions should be, but
having a separate \expr (or \setexpr, etc) gives us a green field to
develop them.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-04-11 13:53:21 Re: Reversed sync check in pg_receivewal
Previous Message Robert Haas 2017-04-11 13:45:28 Re: GSOC'17 project introduction: Parallel COPY execution with errors handling