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

From Josh Berkus
Subject Re: pgbench - allow backslash-continuations in custom scripts
Date
Msg-id 55871D04.8070005@agliodbs.com
Whole thread Raw
In response to pgbench - allow backslash-continuations in custom scripts  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: pgbench - allow backslash-continuations in custom scripts  (Fabien COELHO <coelho@cri.ensmp.fr>)
Re: pgbench - allow backslash-continuations in custom scripts  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
Fabien,

> Without a lexer it is possible to fool pgbench with somehow contrived
> examples, say with:
> 
>   SELECT 'hello;
>     world';
> 
> The ";" within the string will be considered as end-of-line.
> 
> Also, comments intermixed with sql on the same line would generate errors.
> 
>   SELECT 1 -- one
>     + 3;
> 
> Would fail, but comments on lines of their own are ok.
> 
> It may be argued that these are not a likely scripts and that this
> behavior could be declared as a "feature" for keeping the code simple.

Yeah, these seem pretty contrived.  I would personally be OK with
breaking them.

> ISTM that it would be an overall improvement, but also the ;-termination
> requirement breaks backward compatibility.

Look, how many people in the world develop their own pgbench scripts?
And how many of those aren't on this list right now, reading this
thread?  I expect I could count them on my fingers and toes.
Backwards-compatability for pgdump, pg_basebackup, initdb, etc. matters.The worst case with pgbench is that we break
twopeople's test scripts,
 
they read the release notes, and fix them.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: castoroides spinlock failure on test_shm_mq
Next
From: Fabien COELHO
Date:
Subject: Re: pgbench - allow backslash-continuations in custom scripts