Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

Corey Huinker <corey.huinker@gmail.com>

From: Corey Huinker <corey.huinker@gmail.com>
To: Erik Rijkers <er@xs4all.nl>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Daniel Verite <daniel@manitou-mail.org>, "David G. Johnston" <david.g.johnston@gmail.com>, Fabien COELHO <coelho@cri.ensmp.fr>, Greg Stark <stark@mit.edu>, Robert Haas <robertmhaas@gmail.com>, Jim Nasby <Jim.Nasby@bluetreble.com>, PostgreSQL <pgsql-hackers@postgresql.org>, pgsql-hackers-owner@postgresql.org
Date: 2017-03-17T15:40:19Z
Lists: pgsql-hackers
>
>
> command.c:38:25: fatal error: conditional.h: No such file or directory
>  #include "conditional.h"
>

Odd, it's listed as a new file in git status. Anyway, my point of posting
the WIP patch was to give people a reference point and spark discussion
about the next step, and it succeeded at that.

Commits

  1. Support \if ... \elif ... \else ... \endif in psql scripting.

  2. Add a "void *" passthrough pointer for psqlscan.l's callback functions.