The big difference ... all DBs (at least, the ones I listed, including PostgreSQL) support the single quote as it's own escape character - so no difference when it comes to app porting (yes, PostgreSQL has the \' method as well, but '' works across the board).
The big P's atypical handing of backslashes is what causes the grief.
Thanks for the confirmation of the behaviour - I'm off to do some hacking (either of my code, or PostgreSQL's) :-)
The contents of this post are my opinions only
If swallowed seek medical advice
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Tuesday, 30 December 2003 15:09
> To: Grant Allen
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] Any way to disable backslash as a
> string literal
> escape character?
> "Grant Allen" <Grant(dot)Allen(at)towersoft(dot)com(dot)au> writes:
> > Basically, I want to turn off backslash ( \ ) as an escape character
> > in string literals.
> No can do without hacking backend code. But why are you more
> about backslash than, say, single-quote (')? I cannot
> envision any way
> of embedding arbitrary strings into SQL commands that doesn't
> have some
> kind of escape-character rule.
> I suspect what you really need is a way to supply strings as
> parameters to SQL commands. This is available in PG as of 7.4, and I
> think all the other major DBs had it long before.
> regards, tom lane
pgsql-general by date
|Next:||From: Jan Wieck||Date: 2003-12-30 05:33:16|
|Subject: Re: [PATCHES] update i386 spinlock for hyperthreading|
|Previous:||From: Bret Busby||Date: 2003-12-30 04:56:19|
|Subject: Re: Is my MySQL Gaining ?|