pgsql: Add \if support to pgbench
Add \if support to pgbench
Patch adds \if to pgbench as it done for psql. Implementation shares condition
stack code with psql, so, this code is moved to fe_utils directory.
Author: Fabien COELHO with minor editorization by me
Review by: Vik Fearing, Fedor Sigaev
Discussion: /messages/by-id/alpine.DEB.2.20.1711252200190.28523@lancre
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f67b113ac62777d18cd20d3c4d05be964301b936
Modified Files
--------------
doc/src/sgml/ref/pgbench.sgml | 15 +
doc/src/sgml/ref/psql-ref.sgml | 2 +-
src/bin/pgbench/pgbench.c | 359 +++++++++++++++++++----
src/bin/pgbench/t/001_pgbench_with_server.pl | 43 ++-
src/bin/pgbench/t/002_pgbench_no_server.pl | 52 ++++
src/bin/psql/Makefile | 2 +-
src/bin/psql/command.h | 2 +-
src/bin/psql/prompt.h | 2 +-
src/bin/psql/psqlscanslash.l | 2 +-
src/fe_utils/Makefile | 2 +-
src/{bin/psql => fe_utils}/conditional.c | 31 +-
src/{bin/psql => include/fe_utils}/conditional.h | 23 +-
12 files changed, 460 insertions(+), 75 deletions(-)
Teodor Sigaev <teodor@sigaev.ru> writes:
Add \if support to pgbench
Buildfarm says you didn't account for MSVC build ...
regards, tom lane
Buildfarm says you didn't account for MSVC build ...
Yep, I havn't. Will see
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/
Teodor Sigaev <teodor@sigaev.ru> writes:
Add \if support to pgbench
Buildfarm says you didn't account for MSVC build ...
Argh.
I'm responsible, but I do not know how to help on this one:-(
Probably some magic in "Mkvbuild.pm"? But nothing obvious...
Looking at "msvc/Install.pm", 'pgbench' is listed in @client_contribs
where ISTM that it does not belong anymore, it is now a standard client
program file.
--
Fabien.
On 2018-03-22 14:42:26 +0000, Teodor Sigaev wrote:
Add \if support to pgbench
Patch adds \if to pgbench as it done for psql. Implementation shares condition
stack code with psql, so, this code is moved to fe_utils directory.Author: Fabien COELHO with minor editorization by me
Review by: Vik Fearing, Fedor Sigaev
Discussion: /messages/by-id/alpine.DEB.2.20.1711252200190.28523@lancre
This broke MSVC in some way, apparently:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=whelk&dt=2018-03-22%2016%3A41%3A07
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&dt=2018-03-22%2016%3A30%3A25
Suspect it didn't update the msvc project build infrastructure.
"C:\buildfarm\buildenv\HEAD\pgsql.build\pgsql.sln" (Standardziel) (1) ->
"C:\buildfarm\buildenv\HEAD\pgsql.build\pgbench.vcxproj" (Standardziel) (100) ->
(Link Ziel) ->
pgbench.obj : error LNK2019: unresolved external symbol _conditional_stack_create referenced in function _CheckConditional [C:\buildfarm\buildenv\HEAD\pgsql.build\pgbench.vcxproj]
pgbench.obj : error LNK2019: unresolved external symbol _conditional_stack_destroy referenced in function _CheckConditional [C:\buildfarm\buildenv\HEAD\pgsql.build\pgbench.vcxproj]
pgbench.obj : error LNK2019: unresolved external symbol _conditional_stack_push referenced in function _doCustom [C:\buildfarm\buildenv\HEAD\pgsql.build\pgbench.vcxproj]
pgbench.obj : error LNK2019: unresolved external symbol _conditional_stack_pop referenced in function _doCustom [C:\buildfarm\buildenv\HEAD\pgsql.build\pgbench.vcxproj]
pgbench.obj : error LNK2019: unresolved external symbol _conditional_stack_peek referenced in function _doCustom [C:\buildfarm\buildenv\HEAD\pgsql.build\pgbench.vcxproj]
pgbench.obj : error LNK2019: unresolved external symbol _conditional_stack_poke referenced in function _doCustom [C:\buildfarm\buildenv\HEAD\pgsql.build\pgbench.vcxproj]
pgbench.obj : error LNK2019: unresolved external symbol _conditional_stack_empty referenced in function _doCustom [C:\buildfarm\buildenv\HEAD\pgsql.build\pgbench.vcxproj]
pgbench.obj : error LNK2019: unresolved external symbol _conditional_active referenced in function _doCustom [C:\buildfarm\buildenv\HEAD\pgsql.build\pgbench.vcxproj]
.\Release\pgbench\pgbench.exe : fatal error LNK1120: 8 unresolved externals [C:\buildfarm\buildenv\HEAD\pgsql.build\pgbench.vcxproj]
"C:\buildfarm\buildenv\HEAD\pgsql.build\pgsql.sln" (Standardziel) (1) ->
"C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj" (Standardziel) (109) ->
command.obj : error LNK2019: unresolved external symbol _conditional_stack_push referenced in function _HandleSlashCmds [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
command.obj : error LNK2019: unresolved external symbol _conditional_stack_pop referenced in function _HandleSlashCmds [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
mainloop.obj : error LNK2001: unresolved external symbol _conditional_stack_pop [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
command.obj : error LNK2019: unresolved external symbol _conditional_stack_peek referenced in function _exec_command_elif [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
command.obj : error LNK2019: unresolved external symbol _conditional_stack_poke referenced in function _exec_command_elif [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
psqlscanslash.obj : error LNK2001: unresolved external symbol _conditional_active [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
command.obj : error LNK2001: unresolved external symbol _conditional_active [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
common.obj : error LNK2001: unresolved external symbol _conditional_active [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
mainloop.obj : error LNK2001: unresolved external symbol _conditional_active [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
prompt.obj : error LNK2001: unresolved external symbol _conditional_active [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
command.obj : error LNK2019: unresolved external symbol _conditional_stack_set_query_len referenced in function _exec_command_if [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
command.obj : error LNK2019: unresolved external symbol _conditional_stack_get_query_len referenced in function _discard_query_text [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
command.obj : error LNK2019: unresolved external symbol _conditional_stack_set_paren_depth referenced in function _exec_command_if [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
command.obj : error LNK2019: unresolved external symbol _conditional_stack_get_paren_depth referenced in function _discard_query_text [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
mainloop.obj : error LNK2019: unresolved external symbol _conditional_stack_create referenced in function _MainLoop [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
startup.obj : error LNK2001: unresolved external symbol _conditional_stack_create [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
mainloop.obj : error LNK2019: unresolved external symbol _conditional_stack_destroy referenced in function _MainLoop [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
startup.obj : error LNK2001: unresolved external symbol _conditional_stack_destroy [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
mainloop.obj : error LNK2019: unresolved external symbol _conditional_stack_empty referenced in function _MainLoop [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
.\Release\psql\psql.exe : fatal error LNK1120: 12 unresolved externals [C:\buildfarm\buildenv\HEAD\pgsql.build\psql.vcxproj]
59 Warnung(en)
29 Fehler
Verstrichene Zeit 00:07:44.30
On 2018-03-22 11:24:10 -0700, Andres Freund wrote:
On 2018-03-22 14:42:26 +0000, Teodor Sigaev wrote:
Add \if support to pgbench
Patch adds \if to pgbench as it done for psql. Implementation shares condition
stack code with psql, so, this code is moved to fe_utils directory.Author: Fabien COELHO with minor editorization by me
Review by: Vik Fearing, Fedor Sigaev
Discussion: /messages/by-id/alpine.DEB.2.20.1711252200190.28523@lancreThis broke MSVC in some way, apparently:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=whelk&dt=2018-03-22%2016%3A41%3A07
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&dt=2018-03-22%2016%3A30%3A25Suspect it didn't update the msvc project build infrastructure.
Sorry for the dupe, hadn't fetched more recent email. Teodor's fix looks
right.
- Andres