into.sql

application/x-sql

Filename: into.sql
Type: application/x-sql
Part: 1
Message: pgbench - allow to store select results into variables
SELECT 1;
\into one
\set t debug(:one)
SELECT 2, 2+1;
\into x y
\set t debug(:x)
\set t debug(:y)
SELECT 2*2 \; SELECT 3+2.0, 6;
\into a b
\set t debug(:a)
\set t debug(:b)
\;\; SELECT (pi() * 2.0)::INT\; UPDATE pgbench_accounts SET abalance = abalance + 1 WHERE aid=1;
\into six
\set t debug(:six)