Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-20 Thread Bruce Momjian
Patch applied. Thanks. --- Philip Warner wrote: Not sure if this is the desired approach, but since it works, I thought I'd send it. This patch allows pg_restore to recognize $-quotes in SQL queries. It will

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-18 Thread Philip Warner
At 01:44 PM 18/08/2004, Bruce Momjian wrote: This is quite a large patch, but we do need a solution to this problem. Should it be applied? It's not as large as you might think; I had to indent a large chunk of code, and that shows up in the diff. Try applying it, and looking at a 'diff -b'.

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-18 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: ISTM that a very simple alternative would be to force pg_dump to inhibit dollar quoting for non-text dumps. I don't want to do that, but I did think that a simpler alternative would be to inhibit pg_restore from attempting to parse FUNCTION entries. I

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-18 Thread Philip Warner
At 12:47 AM 19/08/2004, Tom Lane wrote: I don't want to do that, but I did think that a simpler alternative would be to inhibit pg_restore from attempting to parse FUNCTION entries. I can't see any strong need for it to do so. I don't like hard-coding stuff based on the TOC tags; but we *might*

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-18 Thread Tom Lane
Philip Warner [EMAIL PROTECTED] writes: If the patch is not kosher, then I'd vote for adding a do not parse flag on the TOC entries when dumping them. Or a statement count. Unless you plan to abandon compatibility with existing dump files, this doesn't seem like much of a solution ...

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-18 Thread Andrew Dunstan
Tom Lane said: Andrew Dunstan [EMAIL PROTECTED] writes: ISTM that a very simple alternative would be to force pg_dump to inhibit dollar quoting for non-text dumps. I don't want to do that, but I did think that a simpler alternative would be to inhibit pg_restore from attempting to parse

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-18 Thread Bruce Momjian
Per Tom ... Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it.

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-18 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: ISTM that a very simple alternative would be to force pg_dump to inhibit dollar quoting for non-text dumps. ... OK. Not sure I understand why, though - the whole point of putting dollar quoting into pg_dump was to make text dumps nicer to read, I

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-18 Thread Andrew Dunstan
Tom Lane wrote: Also, for testing purposes I think it's important that pg_dump -Fc | pg_restore generate exactly the same script as pg_dump. This is true currently (unless someone's broken it again recently) and I don't want to give up the property. Ok, that part I certainly buy. cheers andrew

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-18 Thread Philip Warner
At 01:33 AM 19/08/2004, Tom Lane wrote: pg_dump -Fc | pg_restore generate exactly the same script as pg_dump. Hard to believe this was not always true. Not sure I like the requirement that pg_restore to a database behave just like 'pg_restore | psql', though 8-}.

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-18 Thread Philip Warner
At 01:22 AM 19/08/2004, Tom Lane wrote: Philip Warner [EMAIL PROTECTED] writes: If the patch is not kosher, then I'd vote for adding a do not parse flag on the TOC entries when dumping them. Or a statement count. Unless you plan to abandon compatibility with existing dump files, this doesn't

Re: [PATCHES] pg_restore recognizing $-quotes

2004-08-17 Thread Bruce Momjian
This is quite a large patch, but we do need a solution to this problem. Should it be applied? --- Philip Warner wrote: Not sure if this is the desired approach, but since it works, I thought I'd send it. This patch