Re: [HACKERS] psql - add ability to test whether a variable exists

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: [HACKERS] psql - add ability to test whether a variable exists
Дата
Msg-id alpine.DEB.2.20.1709200810030.25402@lancre
обсуждение исходный текст
Ответ на Re: [HACKERS] psql - add ability to test whether a variable exists  (Robins Tharakan <tharakan@gmail.com>)
Ответы Re: [HACKERS] psql - add ability to test whether a variable exists  (Robins Tharakan <tharakan@gmail.com>)
Re: [HACKERS] psql - add ability to test whether a variable exists  (Robins Tharakan <tharakan@gmail.com>)
Список pgsql-hackers
Hello Robins,

Thanks for the review.

> The following review has been posted through the commitfest application:
> make installcheck-world:  not tested
> Implements feature:       tested, failed

Where ?

> Spec compliant:           not tested
> Documentation:            tested, failed

Where ? I just regenerated the html doc on the patch without a glitch.

> The patch applies cleanly and compiles + installs fine (although am 
> unable to do installcheck-world on my Cygwin setup). This is how the 
> patch works on my setup.
>
> $ /opt/postgres/reviewpatch/bin/psql -U postgres -h localhost
> psql (11devel, server 9.6.1)
> Type "help" for help.
>
> postgres=# \set i 1
> postgres=# \if :{?i}
> postgres=# \echo 'testing'
> testing
> postgres=# \endif
> postgres=# \if :{?id}
> postgres@# \echo 'testing'
> \echo command ignored; use \endif or Ctrl-C to exit current \if block
> postgres@# \endif
> postgres=#

ISTM that this is the expected behavior.

In the first case, "i" is defined, so the test is true and the echo 
echoes.

In the second case, "id" is undefined, the test is false and the echo is 
skipped.

I do not understand why you conclude that the feature "failed".

-- 
Fabien.


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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mithun Cy
Дата:
Сообщение: Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with alot of columns
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: [HACKERS] pgbench: Skipping the creating primary keys afterinitialization