Re: ECPG gets embedded quotes wrong - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ECPG gets embedded quotes wrong
Date
Msg-id 5118.1603388064@sss.pgh.pa.us
Whole thread Raw
In response to Re: ECPG gets embedded quotes wrong  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> Poking at this further, I noticed that there's a semi-related bug
> that this patch changes the behavior for, without fixing it exactly.
> That has to do with use of a string literal as "execstring" in ECPG's
> PREPARE ... FROM and EXECUTE IMMEDIATE commands.  Right now, it
> appears that there is simply no way to write a double quote as part
> of the SQL command in this context.

In the other thread, 1250kv pointed out that you can use an octal
escape (\042) to get a quote mark.  That's pretty grotty, but it
does work in existing ECPG releases as well as with this patch.

So now I think the best answer for this part is just to document that
workaround.  Given the lack of complaints up to now, it's definitely not
worth the amount of trouble that'd be needed to have a cleaner solution.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Deleting older versions in unique indexes to avoid page splits
Next
From: Peter Geoghegan
Date:
Subject: Re: Deleting older versions in unique indexes to avoid page splits