Re: pg_restore (libpq? parser?) bug in 8

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore (libpq? parser?) bug in 8
Дата
Msg-id 23064.1092276920@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_restore (libpq? parser?) bug in 8  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: pg_restore (libpq? parser?) bug in 8  (Philip Warner <pjw@rhyme.com.au>)
Re: pg_restore (libpq? parser?) bug in 8  (Philip Warner <pjw@rhyme.com.au>)
Re: pg_restore (libpq? parser?) bug in 8  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> Con someone confirm how dollar quoting works:
>      '$[tag]$'
> where tag is alpha chars? any chars? \n? \r?

IIRC the tag is either empty or anything that looks like a
(dollar-sign-less) identifier.  But check the rules in scan.l to be sure.

> Is there any circumstance where an unquoted '$' is valid?

$n parameter identifiers (which is why the tag cannot start with
a digit).  Also, I believe $ can be embedded in identifiers (ie,
it can be a non-first character).  So a dollar quote can't be
adjacent to a preceding identifier.

IIRC we tried to do ad-hoc code for dollar quoting in psql, and gave it
up as a bad job.  You might need to bite the bullet and implement a flex
lexer.

Why exactly does pg_restore need to parse the SQL anyway?
        regards, tom lane


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

Предыдущее
От: Brian Hirt
Дата:
Сообщение: Re: will PITR in 8.0 be usable for "hot spare"/"log shipping" type
Следующее
От: Philip Warner
Дата:
Сообщение: Re: pg_restore (libpq? parser?) bug in 8