pgsql: Create a psql command \gset to store query results into psql var - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Create a psql command \gset to store query results into psql var
Date
Msg-id E1U1lEi-0006Ib-Aq@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Create a psql command \gset to store query results into psql variables.

This eases manipulation of query results in psql scripts.

Pavel Stehule, reviewed by Piyush Newe, Shigeru Hanada, and Tom Lane

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d2d153fdb08053d655bd0fef14187eed6a674193

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml     |   40 ++++++++++++++
src/bin/psql/command.c             |   18 ++++++-
src/bin/psql/common.c              |  105 ++++++++++++++++++++++++++++++++---
src/bin/psql/help.c                |    5 +-
src/bin/psql/settings.h            |    1 +
src/bin/psql/tab-complete.c        |    2 +-
src/test/regress/expected/psql.out |   54 ++++++++++++++++++
src/test/regress/parallel_schedule |    2 +-
src/test/regress/serial_schedule   |    3 +-
src/test/regress/sql/psql.sql      |   39 +++++++++++++
10 files changed, 254 insertions(+), 15 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pgsql: Mark vacuum_defer_cleanup_age as PGC_POSTMASTER.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: PL/Python: Add result object str handler