Re: proposal \gcsv

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Daniel Verite <daniel(at)manitou-mail(dot)org>, Vik Fearing <vik(at)postgresfriends(dot)org>, Erik Rijkers <er(at)xs4all(dot)nl>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal \gcsv
Date: 2020-04-03 22:24:58
Message-ID: 24173.1585952698@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> We can have a new commands for cloning print environments and switch to one
> shot environment. It can be based just on enhancing of \pset command

> \pset save anyidentifier .. serialize settings
> \pset load anyidentifier .. load setting
> \pset oneshot [anyidentifer] .. prepare and set copy of current print
> setting for next execution command
> \pset main
> \pset reset .. reset to defaults

I feel like that's gotten pretty far away from the idea of a simple,
easy-to-use way of adjusting the parameters for one \g operation.
There'd be a whole lot of typing involved above and beyond the
obviously-necessary part of specifying the new pset parameter values.

(Also, it's not clear to me how that's any more robust than the
stack idea. If you could lose "\pset pop" to an error, you could
lose "\pset reset" too.)

If people are upset about the extra whitespace in the paren-style
proposal, we could do without it. The only real problem would be
if there's ever a pset parameter for which a trailing right paren
could be a sensible part of the value. Maybe that's not ever
going to be an issue; or maybe we could provide a quoting mechanism
for weird pset values.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2020-04-03 22:29:50 Re: backup manifests and contemporaneous buildfarm failures
Previous Message Alvaro Herrera 2020-04-03 22:24:41 Re: backup manifests and contemporaneous buildfarm failures