Re: [HACKERS] psql - add special variable to reflect the last query status
От | Pavel Stehule |
---|---|
Тема | Re: [HACKERS] psql - add special variable to reflect the last query status |
Дата | |
Msg-id | CAFj8pRChRBgHyKw1bG3nG=Lu46PE97Dbcax9pBdKScofqZejVA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] psql - add special variable to reflect the last query status (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: [HACKERS] psql - add special variable to reflect the last querystatus
|
Список | pgsql-hackers |
Hi
2017-06-19 5:55 GMT+02:00 Pavel Stehule <pavel.stehule@gmail.com>:
2017-06-17 7:58 GMT+02:00 Fabien COELHO <coelho@cri.ensmp.fr>:I have not any other comments. The implementation is trivial. I rerun all
tests and tests passed.
I'll mark this patch as ready for commiters.
Oops, I just noticed a stupid confusion on my part which got through, I was setting "ERROR" as "success", inverting the expected boolean value.
Here is a fixed version.I missed it too.We can introduce macro SetVariableBool(vars, varname, bool) insteadSetVariable(pset.vars, "ERROR", "FALSE");
I checked source code, and it requires little bit more harder refactoring because now we have SetVariableBool - what is unhappy name, because it initialize variable to ON value. It is question what is better name?
I found more interesting issue - the code of SetResultVariables is partially redundant with AcceptResult - maybe the switch there can be shared.
Regards
Pavel
RegardsPavel
--
Fabien.
В списке pgsql-hackers по дате отправления: