Re: [PATCHES] dollar quoting

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] dollar quoting
Дата
Msg-id 5693.1076823904@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] dollar quoting  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: [PATCHES] dollar quoting  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> ... But how about
>> 42$foo$
>> This is a syntax error in 7.4, and we propose to redefine it as an
>> integer literal '42' followed by a dollar-quote start symbol.

> The test should not succeed anywhere in the string '42$foo$'.

No, it won't.  The problem is that it should, because the backend will
see that as '42' followed by a $foo$ quote start.

> Interacting with lexer states would probably be ... unpleasant. Matching
> a stream oriented lexer with a line oriented CLI would be messy I suspect.

I think it would not be that bad.  We'd have to run the lexer on the
command input buffer and see what state it terminates in.

            regards, tom lane

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

Предыдущее
От: "Bort, Paul"
Дата:
Сообщение: Re: Cannot read block error.
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Renaming tables to other schemas