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

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Re: pg_restore (libpq? parser?) bug in 8
Дата
Msg-id 6.1.1.1.0.20040812132807.05515138@203.8.195.10
обсуждение исходный текст
Ответ на Re: pg_restore (libpq? parser?) bug in 8  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_restore (libpq? parser?) bug in 8  ("Andrew Dunstan" <andrew@dunslane.net>)
Список pgsql-hackers
At 12:15 PM 12/08/2004, Tom Lane wrote:
>You might need to bite the bullet and implement a flex
>lexer.

I'd like to avoid this if I can; AFAICT, for statement detection on 
pg_restore, I can require white space before the $tag. Since I also skip 
over all quoted text, the bodies of functions are ignored. The only issues 
will be attribute names with ' $' in them, but they will be quoted as well 
(so ignored).

So to recognize a tag, I look for a '$' after white space, and assume it's 
a tag start. If I subsequently read an invalid tag char, I just go back 
into scan mode on that character and assume the '$...' was some other valid 
sql element.
From other threads, it sounds like removing the statement detection code 
entirely is not an option.



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 03 5330 3172          |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                 |    --________--
PGP key available upon request,  |  /
and from pgp.mit.edu:11371       |/ 



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

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: pg_dump 'die_on_errors'
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: Coming soon: PG 7.4.4, 7.3.7, 7.2.5