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

From Fabien COELHO
Subject Re: \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)
Date
Msg-id alpine.DEB.2.20.1703250719430.8361@lancre
Whole thread Raw
In response to Re: \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)
List pgsql-hackers
> As for a function for digested ignored slash options, it seems like I can
> disregard the true/false value of the "semicolon" parameter. Is that
> correct?

Dunno.

>> I do not see that as a significant issue, especially compared to the
>> benefit of having the automaton transition management in a single place.
>
> I'm still struggling to see how this would add any clarity to the code
> beyond what I can achieve by clustering the
> exec_command_(if/elif/else/endif) near one another.

Hmmm... it is more cleanly encapsulated if in just one function?

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)
Next
From: Ashutosh Sharma
Date:
Subject: Re: Add pgstathashindex() to get hash index table statistics.