Maybe this can be a discussed in a follow-up patch and Corey should
proceed to finalize the if patch?

In the event that we can leave prompting to a later patch, here are the v12
highlights:

My 0.02€ about v12: Patch applies, make check ok, psql make check ok.

- created conditional.h and conditional.c which contain the functions with
stack-ish push/pop/peek/poke names

Why not.

- now all non-test, non-doc changes are in src/bin/psql

Hmmm, see below.

- moved conditional stack out of scan_state, stack state maintained by
mainloop.c/startup.c, passed to HandleSlashCommands

ISTM that it is kind of a regression, because logically this is about the scan state so it should be in the corresponding structure, and having two structures to pass the scan state is not an improvement...

- documentation encourages the user to employ ON_ERROR_STOP when using
conditionals

Indeed. The paragraph explanations are clear enough to me.

I would suggest to also apply the advice to the example shown, including a comment about why the variable is set on.

Also, the last element of the tap tests should be distinct: I suggest to use 'if syntax error' and 'elif syntax error' in place of 'syntax error' for the two first tests.

--
Fabien.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to