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

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Verite <daniel(at)manitou-mail(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Erik Rijkers <er(at)xs4all(dot)nl>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Date: 2017-03-27 19:25:39
Message-ID: alpine.DEB.2.20.1703272110480.19631@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> And here you go

Patch applies cleany, make check ok. Looks pretty good.

A minor detail I have just noticed, sorry: now that options are discarded
by functions, some string variable declarations should be moved back
inside the active branch. You moved them out because you where sharing the
variables between the active & inactive branches, but this is no longer
necessary, and the project practice seems to declare variables just where
they are needed. That would be pattern in d, encoding in encoding, fname
in f and g and include and out and s, prefix in gset, opt in help, opt* in
lo and pset and set, arg* in prompt, env* in setenv... and maybe a few
others.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Beena Emerson 2017-03-27 19:36:13 Re: increasing the default WAL segment size
Previous Message Andreas Seltenreich 2017-03-27 18:30:51 Re: [sqlsmith] Failed assertion in _hash_kill_items/MarkBufferDirtyHint