Re: Variable substitution in psql backtick expansion
От | Daniel Verite |
---|---|
Тема | Re: Variable substitution in psql backtick expansion |
Дата | |
Msg-id | 9c134d0f-65a7-4dc9-a54b-5b3ea9faf51e@manitou-mail.org обсуждение исходный текст |
Ответ на | Variable substitution in psql backtick expansion (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Variable substitution in psql backtick expansion
|
Список | pgsql-hackers |
Fabien COELHO wrote: > Now it could be decided that \set in psql stays simplistic because it is > not needed as much as it is with pgbench. Fine with me. It's not just that. It's that currently, if we do in psql: \set d sqrt(1 + random(1000) * 17) then we get that: \echo :d sqrt(1+random(1000)*17) I assume we want to keep that pre-existing behavior of \set in psql, 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. Certainly if we want the same sort of evaluator in pgbench and psql we'd better share the code between them, but I don't think it will be exposed by the same backslash commands in both programs, if only for that backward compatibility concern. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
В списке pgsql-hackers по дате отправления: