Re: dollar-quoting in psql and in general

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: dollar-quoting in psql and in general
Дата
Msg-id 411AE9A8.4000402@dunslane.net
обсуждение исходный текст
Ответ на Re: dollar-quoting in psql and in general  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers

Philip Warner wrote:

> At 01:07 PM 12/08/2004, Andrew Dunstan wrote:
>
>> \ is not magical inside dollar quotes,
>
>
> Sorry, I was confused by the manual: the paragraph that starts 
> "C-style backslash escapes are also available..." is right after the 
> paragraphs on dollar-quoting.
>
> The section on dollar-quoting is also not explicit about valid tags, 
> "zero or more characters" is all I can see. Can you give me a 
> definitive answer as to what is valid? AFAICT, must be 
> [A-Z,a-z,0-9,_]*, with non-numeric start. Is that right?
>
>

Don't forget the high-bit chars too. pgsqlscan.l says:

dolq_start      [A-Za-z\200-\377_]
dolq_cont       [A-Za-z\200-\377_0-9]
dolqdelim       \$({dolq_start}{dolq_cont}*)?\$

The scanner files for plpgsql and the backend have equivalent specs, so 
this is definitive.

cheers

andrew


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: dollar-quoting in psql and in general
Следующее
От: Philip Warner
Дата:
Сообщение: Re: pg_dump 'die_on_errors'