Re: Variable substitution in psql backtick expansion - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: Variable substitution in psql backtick expansion
Date
Msg-id alpine.DEB.2.20.1704040016410.26357@lancre
Whole thread Raw
In response to Re: Variable substitution in psql backtick expansion  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers
> \set d sqrt(1 + random(1000) * 17)
> \echo :d
> sqrt(1+random(1000)*17)
>
> I assume we want to keep that pre-existing behavior of \set in
> psql,

Ok. So no interpreted expression ever in psql's \set for backward 
compatibility.

> that is, making a copy of that string and associating a name to it, 
> whereas I guess pgbench computes a value from it and stores that value.

Actually it stores the parsed tree, ready to be executed.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Supporting huge pages on Windows
Next
From: Michael Paquier
Date:
Subject: Re: Rewriting the test of pg_upgrade as a TAP test