Re: [PATCHES] dollar quoting

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: [PATCHES] dollar quoting
Дата
Msg-id 40316B42.7060407@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: [PATCHES] dollar quoting  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCHES] dollar quoting  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> Actually, I thought the way to handle it would be to duplicate the
> backend lexer as nearly as possible.  Most of the productions would have
> empty bodies probably, but doing it that way would guarantee that in
> fact psql and the backend would lex a string the same way, which is
> exactly the problem we are facing here.  You'd fall out of the lexer
> only upon detecting backslash (unless we want to put backslash command
> lexing into the flex code, which might or might not be a good idea),
> or upon detecting a ';' at parenthesis depth 0, or upon hitting end of
> string.  In the last case the lexer state would indicate which prompt
> we need to give.

You know what would be really sweet?  If the lexing was made available 
as a public function.  eg. So I could parse queries in phpPgAdmin before 
sending them to the backend, etc...

Chris


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

Предыдущее
От: "Simon Riggs"
Дата:
Сообщение: Re: [PATCHES] update i386 spinlock for hyperthreading
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] dollar quoting