Re: [HACKERS] Undefined psql variables - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] Undefined psql variables
Date
Msg-id alpine.DEB.2.20.1704081204420.22037@lancre
Whole thread Raw
In response to Re: [HACKERS] Undefined psql variables  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] Undefined psql variables  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Hello Pavel,
n
> you proposal disallow client side expressions.

I do agree that some client side expressions are necessary. I do not want 
to disallow them.

> I agree so is not possible to mix server side and client side 
> expressions.

My point is that a minimal of cross-support is possible.

> But I am sceptic so benefit of server side expression is higher than a 
> lost of client side expressions.

There is a misunderstanding. I am not against client side expression. I do 
want to allow the same server & client side capabilities suggested by Tom, 
I'm just arguing about the syntax, to avoid a prefix oriented approach.

> If we disallow server side expressions, then your examples are only two
> lines longer, but the implementation can be more simpler.
>
> SELECT version FROM  app_version
> \gset
> \if :version >= 2.0
> ...
>
> Still I don't think so server side expression in \if is good idea.

Ok, so you do not like server-side expression capabities integrated to 
\if. I understood that you were in favor of Tom's proposal.

From a semantical point of view they are not necessary because the same 
effect can be obtained through \gset, at the price of an intermediate 
variable. So the server-side thing is just a syntax convenience. I think 
that independently of whether they are added, Tom's point is that it 
should be possible to add those features later on, hence the discussion 
about a design.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: [HACKERS] [PATCH] Add GUCs for predicate lock promotion thresholds
Next
From: Fabien COELHO
Date:
Subject: Re: [pgsql-www] [HACKERS] Small issue in online devel documentationbuild