Hello Tom,
Patch applies cleanly. Make check ok. Feature still works!
Idem for v30.
[...] Aside from cosmetic changes, I've made it behave reasonably for
cases where \if is used on portions of a query, for instance
SELECT
\if :something
var1
\else
var2
\endif
FROM table;
This is commendable, but I would not have bothered, although it is more
cpp-like with it.
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.
which as I mentioned a long time ago is something that people will
certainly expect to work.
I would not have expected it to work, but indeed other people could.
Sometimes I try something with pg and it does not work as I hoped. That is
life.
I also cleaned up a lot of corner-case discrepancies between how much
text is consumed in active-branch and inactive-branch cases (OT_FILEPIPE
is a particularly nasty case in that regard :-()
Indeed.
I plan to read this over again tomorrow and then push it, if there are
not objections/corrections.
My small objection is that an eventual if in pgbench, with a separate
parsing and execution, will not work in the middle of queries as this one.
Do you think that such a discrepancy would be admissible.
--
Fabien.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers