Re: pgbench - allow backslash-continuations in custom scripts

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, andres(at)anarazel(dot)de, hlinnaka(at)iki(dot)fi, josh(at)agliodbs(dot)com, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench - allow backslash-continuations in custom scripts
Date: 2015-07-24 05:39:16
Message-ID: alpine.DEB.2.10.1507240731050.12839@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Kyotaro-san,

>> If you feel that this feature only deserve a lexer solution, then the
>> patch should be "returned with feedback".
>
> It's unfortunate to abandon this idea so I tried this and made it run
> with psql's parser. I think it works as expected.

Wow, you are much more courageous than I am!:-)

> - 0001-Prepare-for-share-psqlscan-with-pgbench.patch
> A patch to modify psql so that psqlscan can be shared with other modules.
>
> - 0002-Make-use-of-psqlscan-in-pgbench.patch
> A patch to use psqlscan in pgbench.
>
> - hoge.sql
> A sample custom script including multilne statement and line comment
>
> I can't judge wheter this is a new version of Febien's patch
> following Tom's suggestion or brand-new one. Anyway I'd like to
> post on this thread.

I think it is really a new patch, but posting it is seems logical because
that is where the discussion was lead.

> - backslash commands is handled as the same as before: multiline
> is not allowed.

Hmm... that is really the feature I wanted to add initially, too bad it is
the dropped one:-)

> Suggestions? Opinions?
>
> I don't have idea how to deal with the copy of psqlscan.[lh] from
> psql. Currently they are simply the dead copies of those of psql.

I think that there should be no copies, but it should use relative
symbolic links so that the files are kept synchronized.

> - Modifying psqlscan in psql requires consideration on how it is
> used in pgbench.

Yep, that is one of the reason why I did not want to go this way, bar my
natural lazyness.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2015-07-24 06:10:59 Re: Asynchronous execution on FDW
Previous Message Ashutosh Bapat 2015-07-24 05:22:35 Re: Autonomous Transaction is back