Re: pgbench - allow backslash-continuations in custom scripts - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pgbench - allow backslash-continuations in custom scripts
Date
Msg-id alpine.DEB.2.10.1507240731050.12839@sto
Whole thread Raw
In response to Re: pgbench - allow backslash-continuations in custom scripts  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: pgbench - allow backslash-continuations in custom scripts
List 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.



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Autonomous Transaction is back
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Asynchronous execution on FDW