Re: Any way to disable backslash as a string literal escape character?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Grant Allen" <Grant(dot)Allen(at)towersoft(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Any way to disable backslash as a string literal escape character?
Date: 2003-12-30 04:09:15
Message-ID: 20279.1072757355@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"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 concerned
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 out-of-line
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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-12-30 04:14:48 Re: [PATCHES] update i386 spinlock for hyperthreading
Previous Message Bruce Momjian 2003-12-30 03:39:28 Re: [pgsql-advocacy] Is my MySQL Gaining ?