Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless) - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Date
Msg-id CADkLM=fj9EOqCB89nJ7Qm9OKdrF9xL0qqaRq3VFa5=vO4faUzg@mail.gmail.com
Whole thread Raw
In response to [HACKERS] Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if,\quit_unless)  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
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:
- created conditional.h and conditional.c which contain the functions with stack-ish push/pop/peek/poke names
- now all non-test, non-doc changes are in src/bin/psql
- moved conditional stack out of scan_state, stack state maintained by mainloop.c/startup.c, passed to HandleSlashCommands
- documentation encourages the user to employ ON_ERROR_STOP when using conditionals
Attachment

pgsql-hackers by date:

Previous
From: Rey
Date:
Subject: [HACKERS] About pg_dump and recover
Next
From: Magnus Hagander
Date:
Subject: Re: [HACKERS] Commit fest 2017-01 will begin soon!