Re: pg_restore recognizing $-quotes - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: pg_restore recognizing $-quotes
Date
Msg-id 3643.24.211.141.25.1092825584.squirrel@www.dunslane.net
Whole thread Raw
In response to Re: pg_restore recognizing $-quotes  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: pg_restore recognizing $-quotes
List pgsql-patches
Bruce Momjian said:
>
> This is quite a large patch, but we do need a solution to this problem.
>  Should it be applied?
>
>

I looked at it briefly, but felt sufficiently daunted that I gave up until I
have time to review it (my time is extremely limited right now).

ISTM that a very simple alternative would be to force pg_dump to inhibit
dollar quoting for non-text dumps. Then we could revisit the issue later on,
and maybe bite the bullet and use flex in pg_restore.

cheers

andrew


---------------------------------------------------------------------------
>
> 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  treat any unquoted string that starts with a $ and has no
>> preceding  identifier chars as a potential $-quote tag, it then makes
>> sure that the  tag chars are valid. If so, it processes the $-quote.
>>
>> Tested against local DBs and regression DB.




pgsql-patches by date:

Previous
From: "Dave Page"
Date:
Subject: Re: [pgsql-hackers-win32] 8.0 Beta 1 // Environment Vars // .pgpass
Next
From: Philip Warner
Date:
Subject: Re: pg_restore recognizing $-quotes