pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: Jim Nasby <Jim.Nasby@bluetreble.com>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: PostgreSQL <pgsql-hackers@postgresql.org>
Cc: pgsql-hackers-owner@postgresql.org
Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Date: Fri, 03 Feb 2017 12:10:35 -0500
Message-ID: <25970.1486141835@sss.pgh.pa.us> (raw )
In-Reply-To: <CADkLM=fxnPtDRJfzVLdy91xR+P3nN-c7O22PNwE+RzKjKMW4oQ@mail.gmail.com >
References: <fe2e8a9c-5a08-44d6-9767-f4dabd7c4f92@manitou-mail.org >
<1084.1485886511@sss.pgh.pa.us >
<CADkLM=fdBs+G1QrUvqu5MxW7jGg-ULZFcM3Fd2kev6fjrp7-0g@mail.gmail.com >
<e9580abbf2d78fa6b6b4af0a4943f5ab@xs4all.nl >
<CADkLM=e1_=iSxP72MP7WOAgyrFC6emO_7yAJDGeeC4tHkYjfcQ@mail.gmail.com >
<alpine.DEB.2.20.1702011407221.31128@lancre >
<CADkLM=cBX9mb1FTymLrijmQFAoHjFZGNhphx6-V9u6jcGHzdTw@mail.gmail.com >
<alpine.DEB.2.20.1702012046410.31128@lancre >
<b52a4e15-8a6a-a3d5-0e92-76263a998829@BlueTreble.com >
<CADkLM=eA+rxg+vA1q0hGqfxH0WeWsLU+7W3xtvxfMO1Rw2YLSw@mail.gmail.com >
<3109.1486085543@sss.pgh.pa.us >
<CADkLM=cWvJPh+-jAuQTPT_117RW49OzVXepioRqOp6ARpQ_KOQ@mail.gmail.com >
<alpine.DEB.2.20.1702030649280.3762@lancre >
<CADkLM=e6u013=KqqGwWEaGHWO0hPKnmLd=UYJf5OKP45fDJp=g@mail.gmail.com >
<1927c741db54ebc5a93374df337591e1@xs4all.nl >
<alpine.DEB.2.20.1702031300100.4856@lancre >
<CADkLM=fPrnnmmkt4whSXmhoC_UMjvdvC2RAaX0XLneqZhzKmDA@mail.gmail.com >
<alpine.DEB.2.20.1702031733390.4856@lancre >
<CADkLM=! fxnPtDRJfzVLdy91xR+P3nN-c7O22PNwE+RzKjKMW4oQ@mail.gmail.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Corey Huinker <corey.huinker@gmail.com> writes:
> Well played (again). That one ranks up there with "and don't call me
> Shirley." I meant in the specific psql-context, does it do anything other
> than (attempt to) terminate sent-but-not-received SQL queries?
It also flushes the input buffer. I think it is probably reasonable to
let it cancel interactive \if state as well. A useful thought-experiment
is to ask what behavior you'd want if we had metacommand loops ... and
I think the answer there is pretty obvious: you'd want control-C to kill
a loop.
I'm less sure about what it ought to do when control is somewhere in
a script file. I *think* we have things set up to kill execution of
script files altogether, in which case we have the answer a fortiori.
If not, there's room for discussion.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
view thread (232+ messages) latest in thread
Message-ID: <25970.1486141835@sss.pgh.pa.us>
Permalink: ../25970.1486141835@sss.pgh.pa.us/
Also on: postgresql.org/message-id/25970.1486141835@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, corey.huinker@gmail.com, coelho@cri.ensmp.fr, er@xs4all.nl, Jim.Nasby@bluetreble.com, daniel@manitou-mail.org, pgsql-hackers-owner@postgresql.org
Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
In-Reply-To: <25970.1486141835@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox