Re: proposal: multiple psql option -c

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Catalin Iacob <iacobcatalin(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, dinesh kumar <dineshkumar02(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: multiple psql option -c
Date: 2015-11-18 19:28:35
Message-ID: CAFj8pRCisq---N07ZL_Na1o2bCESmW2mwoOwHWB4PNkqOtLk-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 1. -c no longer implies --no-psqlrc. That's a backwards incompatibility,
> but very easy to explain and very easy to work around.
>
>
This can be very surprising change. Can we disable it temporary by some
environment variable? like NOPSQLRC ?

> 2. You can have multiple -c and/or -f. Each -c is processed in
> the traditional way, ie, either it's a single backslash command
> or it's sent in a single PQexec. That doesn't seem to me to have
> much impact on the behavior of adjacent -c or -f.
>
> 3. If you combine -1 with -c and/or -f, you get one BEGIN inserted
> at the beginning and one COMMIT at the end. Nothing else changes.
>
> As long as you put only one SQL command per -c, I don't think that
> this definition has any real surprises. And we can discourage
> people from putting more than one, saying that that will invoke
> legacy behaviors you probably don't want.
>

+1

Pavel

>
> regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomasz Rybak 2015-11-18 19:42:41 Re: pglogical_output - a general purpose logical decoding output plugin
Previous Message Robert Haas 2015-11-18 19:20:41 Re: [PATCH] SQL function to report log message