Multiline-statement and multi-statement for pgbench custom script.

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Multiline-statement and multi-statement for pgbench custom script.
Date: 2015-08-28 08:33:44
Message-ID: 20150828.173344.235166706.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, this is a spin-off patch from Fabien COELHO's
backslash-continuations.

The major concept of this patch is making usage of psql's scanner
to get rid of home-grown scanner of pgbench to make
multi-statement feature available for pgbench custom scripts.

This patch does the following things.

- Modify psqlscan.l so that unnecessary functions of it can be
masked when used in other modules like pgbench.

- Modify pgbench to use psqlscan.l so that the following features
available in pgbench.

- multi-statement in custom scripts.
- natural continuation of SQL statements in costom scripts.
- backslash-continuation for pgbench metacommands in costom scripts.

The patch consists of following files.

- 0001-Prepare-to-share-psqlscan-with-pgbench.patch
Modifies psqlscan.l in psql as the preparation.

- 0002-Make-use-of-psqlscan-for-parsing-of-custom-script.patch
Modifies pgbench to use psqlscan.l.

- 0003-Change-MSVC-Build-script.patch
Modify MSVC build script.

- 0004-Change-the-way-to-hold-command-list.patch
Get rid of double-format of internal command list.
This changes the way of holding command list to linked list
totally.

regards,

Attachment Content-Type Size
0001-Prepare-to-share-psqlscan-with-pgbench.patch text/x-patch 8.6 KB
0002-Make-use-of-psqlscan-for-parsing-of-custom-script.patch text/x-patch 19.0 KB
0003-Change-MSVC-Build-script.patch text/x-patch 1.2 KB
0004-Change-the-way-to-hold-command-list.patch text/x-patch 14.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-08-28 08:44:03 Re: patch: version_stamp.pl: Add Git commit info to version if 'git' is specified
Previous Message Kyotaro HORIGUCHI 2015-08-28 08:33:34 Multi-column distinctness.