Re: pgbench - allow to store select results into variables
От
Fabien COELHO
Тема
Re: pgbench - allow to store select results into
variables
Дата
Msg-id
alpine.DEB.2.20.1607151820160.7291@sto
Ответ на
Список
Дерево обсуждения
pgbench - allow to store select results into variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Pavel Stehule <pavel.stehule@gmail.com>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Pavel Stehule <pavel.stehule@gmail.com>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Robert Haas <robertmhaas@gmail.com>
Re: pgbench - allow to store select results into variables Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: pgbench - allow to store select results into variables Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Rafia Sabih <rafia.sabih@enterprisedb.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Rafia Sabih <rafia.sabih@enterprisedb.com>
Re: pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Rafia Sabih <rafia.sabih@enterprisedb.com>
Re: pgbench - allow to store select results intovariables Tatsuo Ishii <ishii@sraoss.co.jp>
Re: pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results intovariables Tatsuo Ishii <ishii@sraoss.co.jp>
Re: pgbench - allow to store select results into variables Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench - allow to store select results intovariables Tatsuo Ishii <ishii@sraoss.co.jp>
Re: pgbench - allow to store select results into variables Andres Freund <andres@anarazel.de>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <fabien.coelho@mines-paristech.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Stephen Frost <sfrost@snowman.net>
Re: [HACKERS] pgbench - allow to store select results into variables Stephen Frost <sfrost@snowman.net>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Stephen Frost <sfrost@snowman.net>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results into variables Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: [HACKERS] pgbench - allow to store select results into variables Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results into variables Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] pgbench - allow to store select results into variables Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results into variables Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Michael Paquier <michael@paquier.xyz>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results into variables Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results into variables Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] pgbench - allow to store select results into variables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - allow to store select results intovariables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: pgbench - allow to store select results into variables Michael Paquier <michael.paquier@gmail.com>
Re: pgbench - allow to store select results into variables Haribabu Kommi <kommi.haribabu@gmail.com>
Re: pgbench - allow to store select results into variables Robert Haas <robertmhaas@gmail.com>
Re: pgbench - allow to store select results into variables Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench - allow to store select results into variables "David G. Johnston" <david.g.johnston@gmail.com>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow to store select results into variables Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench - allow to store select results into
variables Fabien COELHO <coelho@cri.ensmp.fr>
Hello again,
> I'd be okay with
>
> SELECT 1, 2 \into one two
> SELECT 3 \into three
Here is a v2 with more or less this approach, although \into does not end
the query, but applies to the current or last sql command. A query is
still terminated with a ";".
Now it handles things like :
-- standard sql command
SELECT balance FROM bank WHERE id=1;
\into balance
-- compound sql command, three == 3.
SELECT 1, 2 \; SELECT 3 ;
\into three
-- compound query with 2 selects & 3 variables
SELECT i \into one
FROM generate_series(1, 1) AS i \;
SELECT i+1, i+2 \into two three
FROM generate_series(1, 1) AS i ;
I had to add a few lines in psql scanner to count "\;", so the parsing
logic is a little more complicated than before.
--
Fabien.В списке pgsql-hackers по дате отправления