pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
To: Corey Huinker <corey.huinker@gmail.com>
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: Wed, 1 Feb 2017 13:58:36 -0800
Message-ID: <b52a4e15-8a6a-a3d5-0e92-76263a998829@BlueTreble.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1702012046410.31128@lancre>
References: <fe2e8a9c-5a08-44d6-9767-f4dabd7c4f92@manitou-mail.org>
	<alpine.DEB.2.20.1701262143090.26793@lancre>
	<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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2/1/17 12:03 PM, Fabien COELHO wrote:
> I'm unsure whether it is a good idea, I like terse interfaces, but this
> is just an opinion.

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 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: <b52a4e15-8a6a-a3d5-0e92-76263a998829@BlueTreble.com>
Permalink:  ../b52a4e15-8a6a-a3d5-0e92-76263a998829@BlueTreble.com/
Also on:    postgresql.org/message-id/b52a4e15-8a6a-a3d5-0e92-76263a998829@BlueTreble.com

 · 

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, coelho@cri.ensmp.fr, corey.huinker@gmail.com, 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: <b52a4e15-8a6a-a3d5-0e92-76263a998829@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