Re: pgbench - allow backslash-continuations in custom scripts
От | Josh Berkus |
---|---|
Тема | Re: pgbench - allow backslash-continuations in custom scripts |
Дата | |
Msg-id | 55871D04.8070005@agliodbs.com обсуждение исходный текст |
Ответ на | pgbench - allow backslash-continuations in custom scripts (Fabien COELHO <coelho@cri.ensmp.fr>) |
Ответы |
Re: pgbench - allow backslash-continuations in custom
scripts
Re: pgbench - allow backslash-continuations in custom scripts |
Список | 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 по дате отправления: