pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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, 3 Feb 2017 18:42:18 -0600
Message-ID: <ce7ac5bd-9b62-80e2-283d-973b0b72ed56@BlueTreble.com> (raw )
In-Reply-To: <CADkLM=fxL+fg1S_oCn3DXyAZy0cBOM77sGRAScHsop_M2=WHJw@mail.gmail.com >
References: <fe2e8a9c-5a08-44d6-9767-f4dabd7c4f92@manitou-mail.org >
<CADkLM=cr2z935TF3eB9jByWiijv-q2B7--QggfUUB12gCFFByQ@mail.gmail.com >
<CADkLM=di=8WQRQDku6mfN=-pBqVQq_3osAARtVb6Tf0U8vyb7A@mail.gmail.com >
<alpine.DEB.2.20.1701280721020.13068@lancre >
<CADkLM=dm+d_FgtK4wqVkKr-X+naHXw60x+0veb04idFxYB141g@mail.gmail.com >
<alpine.DEB.2.20.1701290916420.13068@lancre >
<alpine.DEB.2.20.1701310658530.9372@lancre >
<CADkLM=c8M9LDBdvijq=yXrS4ar2KLoq7uoYs0JQFmh0d3w2hmg@mail.gmail.com >
<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=fxL+fg1S_oCn3DXyAZy0cBOM77sGRAScHsop_M2=WHJw@mail.gmail.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 2/2/17 4:39 PM, Corey Huinker wrote:
>
> On Wed, Feb 1, 2017 at 4:58 PM, Jim Nasby <Jim.Nasby@bluetreble.com
> <mailto:Jim.Nasby@bluetreble.com>> wrote:
>
> I think the issue here is that the original case for this is a user
> accidentally getting into an \if and then having no clue what's
> going on. That's similar to what happens when you miss a quote or a
> semicolon. We handle those cases with %R, and I think %R needs to
> support if as well.
>
> Perhaps there's value to providing more info (active branch, etc),
> but ISTM trying to do that will just confuse the original (%R) case.
>
>
> Jim,
>
> After spending a few minutes to familiarize myself with %R, I'm in
> agreement with your second statement (adding if-else to %R will just
> confuse %R). However, your first statement seems to indicate the
> opposite. Can you elaborate?
My point was that we need a way for users to know if they're stuck in an
\if block, and right now that's handled with %R (inside transaction,
parens, etc). My other point is that adding all the extra info to %R
would be folly.
Since the current consensus is to be very verbose about \if, this is
obviously a non-issue. Maybe worth adding a 'I' case to %R, but no big
deal if that doesn't happen.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)
--
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: <ce7ac5bd-9b62-80e2-283d-973b0b72ed56@BlueTreble.com>
Permalink: ../ce7ac5bd-9b62-80e2-283d-973b0b72ed56@BlueTreble.com/
Also on: postgresql.org/message-id/ce7ac5bd-9b62-80e2-283d-973b0b72ed56@BlueTreble.com
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: Jim.Nasby@BlueTreble.com, corey.huinker@gmail.com, coelho@cri.ensmp.fr, er@xs4all.nl, tgl@sss.pgh.pa.us, 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: <ce7ac5bd-9b62-80e2-283d-973b0b72ed56@BlueTreble.com>
* 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