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.20040813113553.063442d8@203.8.195.10
обсуждение исходный текст
Ответ на Re: pg_restore (libpq? parser?) bug in 8  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At 11:42 PM 12/08/2004, Tom Lane wrote:
>That's a possibility, but I'd rather work around it by finding a way for
>pg_restore not to need to parse the dollar-quoted literal in the first
>place.

Two possibilities:

1) Parse the tags (I have the code working): it's not that hard, the only 
trick bit being recognizing the tags in the first place. I have assumed 
that any bare unquoted string that is not preceded by valid identifier name 
chars, and which starts with a '$' may be a dollar quote. This seems valid 
to me.

2) We could avoid special coding for TOC entry types (eg. pg_restore 
knowing 'FUNCTION' TOC entries should not be parsed), by changing the TOC 
data to include a flag/counter (set by pg_dump) indicating that the entry 
contains > 1 statements. Then we don't hard code knowledge of TOC entry 
types, and function definitions will not be parsed. Old dump files would be 
treated as multi-statement, and still be parsed.

If my assumption in (1) is valid, then I have a very mild preference for 
it, but am happy with either.


----------------------------------------------------------------
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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: parameter hints to the optimizer
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: [PATCHES] Patch for pg_dump: Multiple -t options and new -T option