Re: pgbench - allow backslash-continuations in custom scripts

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: pgbench - allow backslash-continuations in custom scripts
Дата
Msg-id alpine.DEB.2.10.1506200913180.31742@sto
обсуждение исходный текст
Ответ на Re: pgbench - allow backslash-continuations in custom scripts  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
>> I tend to agree on that bottom line; having this be inconsistent with psql
>> does not seem like a win.
>>
>>> I'm not clear on why we'd need a full SQL lexer.
>>
>> So you don't get fooled by semicolons embedded in string literals or
>> comments.
>
> I take it we ignore those now?  I mean, personally, it wouldn't break
> anything for me but since some other benhcmarks involve random text
> generators ....

If backward compatibility is not an issue (I'm surprised:-), and failure 
is acceptable in contrived cases, a simple implementation would be to 
accumulate lines till one ends with ";\s*$",

Otherwise maybe the "states" management or the lexer are enough (in simple 
quotes, in double quotes, in comment, in stuff), so this can implemented 
without actually requiring another lexer in pgbench and be robust.

-- 
Fabien.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Inheritance planner CPU and memory usage change since 9.3.2
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: The real reason why TAP testing isn't ready for prime time