pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: Michael Meskes <meskes@postgresql.org>
Subject: Re: ECPG gets embedded quotes wrong
Date: Thu, 22 Oct 2020 13:34:24 -0400
Message-ID: <5118.1603388064@sss.pgh.pa.us> (raw)
In-Reply-To: <691295.1603240515@sss.pgh.pa.us>
References: <673825.1603223178@sss.pgh.pa.us>
	<691295.1603240515@sss.pgh.pa.us>

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





view thread (3+ messages)

Message-ID: <5118.1603388064@sss.pgh.pa.us>
Permalink:  ../5118.1603388064@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5118.1603388064@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org, meskes@postgresql.org
  Subject: Re: ECPG gets embedded quotes wrong
  In-Reply-To: <5118.1603388064@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox