into.sql

application/x-sql

Filename: into.sql
Type: application/x-sql
Part: 1
Message: Re: 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 1*2 \; SELECT 2+2.0, 5;
\into a b
\set t debug(:a)
\set t debug(:b)
SELECT (pi() * 2.0)::INT \;
\into six
UPDATE pgbench_accounts SET abalance = abalance + 1 WHERE aid=1;
\set t debug(:six)