Re: pgbench - allow backslash-continuations in custom scripts
В списке pgsql-hackers по дате отправления:
| От | Fabien COELHO |
|---|---|
| Тема | Re: pgbench - allow backslash-continuations in custom scripts |
| Дата | |
| Msg-id | alpine.DEB.2.10.1507031546030.16176@sto обсуждение исходный текст |
| Ответ на | Re: pgbench - allow backslash-continuations in custom scripts (Heikki Linnakangas <hlinnaka@iki.fi>) |
| Список | pgsql-hackers |
> The home-grown lexer is missing e.g. dollar-quoting support, so this is not > be parsed correctly: > > do $$ > begin > ... > end; > $$; > That would be very nice to handle correctly, I've used DO-blocks in pgbench > scripts many times, and it's a pain to have to write them in a single line. Attached is a version which does that (I think), and a test script. - backslash-commands can be \-continuated - sql-commands may include $$-quotes and must end with a ';' - double-dash commentsand blank line are skipped. Obviously it is still a non-lexer hack which can be easily defeated, but ISTM that it handles non-contrived cases well. Anyway ISTM that dollar quoting cannot be handle as such and simply by a lexer, it is really an exception mechanism. -- Fabien.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера