|From:||Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>|
|Subject:||Re: pgbench - allow backslash-continuations in custom scripts|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Hello, Thank you for registering this to CF-Sep.
I missed the regtration window.. It ended earlier than usual..
Most troubles have gone and I'll be back next week.
> The work to be left is eliminating double-format of Command
This is done as the additional fourth patch, not merged into
previous ones, to show what's changed in the manner of command
I repost on this thread the new version of this patch including
this and posted before. This is rebased to current master.
The changes in behaviors brought by this patch has been described
in the privous mail as the following,
> Hmm. psqlscan.l handles multistatement naturally.
> I worked on that and the attached patche set does,
> - backslash continuation for pgbench metacommands.
> set variable \
> <some value>
> - SQL statement natural continuation lines.
> SELECT :foo
> FROM :bar;
> - SQL multi-statement.
> SELECT 1; SELECT 2;
Each of the four patches does the following thigs,
The global variable pset, VariableSpace and backslash syntax of
psql are the obstacles for psqlscan.l from being used by
pgbench. This patch eliminates direct reference to pset and
masks VariableSpace feature (looks ugry..), and enables
backslash syntax in psqlscan.l to be hidden from outside psql
by defining the symbol OUTSIDE_PSQL.
No behavioral changes of pasql are introduced by ths patch.
This is the core of this patch, which makes pgbench to use
psqlscan.l and enables multi-statements,
multiline-SQL-statement and backslash-continuation of
The struct Command is modified that it can be chained in order
to convey multistatement in one line. But the commands are
stored in an array of Command just outside process_commands as
of old. This double-formatting will be removed by the fourth
psqlscan.c is compiled as a part of mainloop.c for some reason
described at the end of the file. I haven't confirmed that the
same thing will happen in pgbench, but I did the same thing for
Compilation will fail on Windows as of this patch.
Changes the build script for Windows platform. It certainly
works but might look a bit odd because of the anormaly of the
compilation way of psqlscan.l
Changes the way to hold commad list from an array to linked
list, to remove the double formatting of Command-list
introduced by the second patch. This removes the explicit
limitation on the number of commands in scripts, as a
NTT Open Source Software Center
|Next Message||Michael Paquier||2015-09-04 05:14:08||Re: Allow replication roles to use file access functions|
|Previous Message||Amit Langote||2015-09-04 05:06:08||Re: BRIN INDEX value|