pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Corey Huinker <corey.huinker@gmail.com>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Greg Stark <stark@mit.edu>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jim Nasby <Jim.Nasby@bluetreble.com>
Cc: PostgreSQL <pgsql-hackers@postgresql.org>
Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Date: Thu, 30 Mar 2017 11:45:51 -0400
Message-ID: <18081.1490888751@sss.pgh.pa.us> (raw )
In-Reply-To: <alpine.DEB.2.20.1703300843020.2076@lancre >
References: <df2c433c-b9ff-4d41-ad08-b0d420b403b8@manitou-mail.org >
<CADkLM=ecKDEyBAOx3fRFtqJb0VqsR+y4-OSzWHS_hMPJ0UD_Rg@mail.gmail.com >
<alpine.DEB.2.20.1703250719430.8361@lancre >
<CADkLM=esbih=DF97=87UjpT-8JjYnLCBy_NFMyM0vs-0jzYe3A@mail.gmail.com >
<alpine.DEB.2.20.1703251857540.8361@lancre >
<CADkLM=dZt6eJQD1pQ7GXUeP83Ut_N+RaRsCgDj+Cpx_bV=LLsg@mail.gmail.com >
<alpine.DEB.2.20.1703270655240.20202@lancre >
<CADkLM=fbEGfea0idN_XsKUG70JmCaMjdejo35q-B5tpC11NTuA@mail.gmail.com >
<alpine.DEB.2.20.1703271631250.10424@lancre >
<CADkLM=czttdEn1fVMb-qAQDvteXU3SOv47GsKbea9+iaYbCK_w@mail.gmail.com >
<alpine.DEB.2.20.1703272110480.19631@lancre >
<CADkLM=eUksHSUc_HXE8CRFgj85C8cABVfVY1hRoTfdNvwwOUGg@mail.gmail.com >
<24980.1490748720@sss.pgh.pa.us >
<21747.1490796899@sss.pgh.pa.us >
<alpine.DEB.2.20.1703292000520.17210@lancre >
<CADkLM=cbF9yLTeU6T_sMxrrpZhxQH_Y+bNXdOFiGn8oVXjBngg@mail.gmail.com >
<alpine.DEB.2.20.1703292248410.20346@lancre >
<10990.1490847359@sss.pgh.pa.us >
<alpine.DEB.2.20.170330084! 3020.2076@lancre >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Fabien COELHO <coelho@cri.ensmp.fr> writes:
>> [...] Aside from cosmetic changes, I've made it behave reasonably for
>> cases where \if is used on portions of a query, for instance
> A small issue I see is that I was planning to add such an if syntax to
> pgbench (well, at least if I succeed in getting boolean expressions and
> setting variables, which is just a maybe), but this kind of if in the
> middle of expression does not make much sense for a pgbench script where
> "if" must be evaluated at execution time, not parse time.
Well, it's not really clear to me why that would be true. If it actually
is impossible to give pgbench equivalent behavior, we'll just have to live
with the discrepancy, but ISTM it could probably be made to work.
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: <18081.1490888751@sss.pgh.pa.us>
Permalink: ../18081.1490888751@sss.pgh.pa.us/
Also on: postgresql.org/message-id/18081.1490888751@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, coelho@cri.ensmp.fr, corey.huinker@gmail.com, daniel@manitou-mail.org, david.g.johnston@gmail.com, stark@mit.edu, er@xs4all.nl, robertmhaas@gmail.com, Jim.Nasby@bluetreble.com
Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
In-Reply-To: <18081.1490888751@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