The bottom line is that in a psql interactive session you cannot really set a variable as the result of a select statement (or at least I did not fine a way). Instead, depending on what you actually want to achieve, you may use a workaround storing a statement or part of it in a variable.
Here an example:
db=> create table test (id int);
CREATE TABLE
db => insert into test select generate_series(1,10);
Hello, I excuse my ignorancewithSQLand myEnglish. I wonder ifthese proceduresare corrector is it abug? I'mtrying to putthe result ofa selectwithin thev_saldo_inivariable, except I realized that thepostgresqlcreated a tablewithv_saldo_inivariable.