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 two people's test scripts, they read the release notes, and fix them. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers