pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Add \if support to pgbench
7+ messages / 4 participants
[nested] [flat]

* pgsql: Add \if support to pgbench
@ 2018-03-22 14:42  Teodor Sigaev <teodor@sigaev.ru>
  0 siblings, 3 replies; 7+ messages in thread

From: Teodor Sigaev @ 2018-03-22 14:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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: https://www.postgresql.org/message-id/flat/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(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: Add \if support to pgbench
@ 2018-03-22 14:54  Fabien COELHO <coelho@cri.ensmp.fr>
  parent: Teodor Sigaev <teodor@sigaev.ru>
  2 siblings, 0 replies; 7+ messages in thread

From: Fabien COELHO @ 2018-03-22 14:54 UTC (permalink / raw)
  To: Teodor Sigaev <teodor@sigaev.ru>; +Cc: pgsql-committers@lists.postgresql.org


> Add \if support to pgbench

Thanks!

-- 
Fabien.




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: Add \if support to pgbench
@ 2018-03-22 15:43  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Teodor Sigaev <teodor@sigaev.ru>
  2 siblings, 2 replies; 7+ messages in thread

From: Tom Lane @ 2018-03-22 15:43 UTC (permalink / raw)
  To: Teodor Sigaev <teodor@sigaev.ru>; +Cc: pgsql-committers@lists.postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>

Teodor Sigaev <teodor@sigaev.ru> writes:
> Add \if support to pgbench

Buildfarm says you didn't account for MSVC build ...

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: Add \if support to pgbench
@ 2018-03-22 16:14  Teodor Sigaev <teodor@sigaev.ru>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 7+ messages in thread

From: Teodor Sigaev @ 2018-03-22 16:14 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>

> 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/




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: Add \if support to pgbench
@ 2018-03-22 17:28  Fabien COELHO <coelho@cri.ensmp.fr>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 7+ messages in thread

From: Fabien COELHO @ 2018-03-22 17:28 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Teodor Sigaev <teodor@sigaev.ru>; pgsql-committers@lists.postgresql.org


> 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.




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: Add \if support to pgbench
@ 2018-03-22 18:24  Andres Freund <andres@anarazel.de>
  parent: Teodor Sigaev <teodor@sigaev.ru>
  2 siblings, 1 reply; 7+ messages in thread

From: Andres Freund @ 2018-03-22 18:24 UTC (permalink / raw)
  To: Teodor Sigaev <teodor@sigaev.ru>; +Cc: pgsql-committers@lists.postgresql.org

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: https://www.postgresql.org/message-id/flat/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




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: Add \if support to pgbench
@ 2018-03-22 18:43  Andres Freund <andres@anarazel.de>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2018-03-22 18:43 UTC (permalink / raw)
  To: Teodor Sigaev <teodor@sigaev.ru>; +Cc: pgsql-committers@lists.postgresql.org

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: https://www.postgresql.org/message-id/flat/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.

Sorry for the dupe, hadn't fetched more recent email. Teodor's fix looks
right.

- Andres




^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2018-03-22 18:43 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-22 14:42 pgsql: Add \if support to pgbench Teodor Sigaev <teodor@sigaev.ru>
2018-03-22 14:54 ` Fabien COELHO <coelho@cri.ensmp.fr>
2018-03-22 15:43 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-03-22 16:14   ` Teodor Sigaev <teodor@sigaev.ru>
2018-03-22 17:28   ` Fabien COELHO <coelho@cri.ensmp.fr>
2018-03-22 18:24 ` Andres Freund <andres@anarazel.de>
2018-03-22 18:43   ` Andres Freund <andres@anarazel.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox