469,621 Members | 1,666 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,621 developers. It's quick & easy.

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

I know this has been asked before - I've trawled through the mail archives and FAQs looking for any info, and only found "that's the way it works" answers.

Basically, I want to turn off backslash ( \ ) as an escape character in string literals. It makes porting apps to PostgreSQL much more difficult, because no major rdbms behaves this way (at least, none of Oracle, SQL Server,DB2, Sybase, Informix, SQL Anywhere or SQL Base ... the one's I've worked with). I know PostgreSQL isn't designed to be a clone of any of these, andI should love it the way it is :-) :-) :-), but this one quirk is annoyingthe hell out of me.

I'm guessing the answer will be no, because it would break things like nullhandling.

So, any postmaster switches, build/make options, etc.? Or should I get hacking myself?

Ciao
Fuzzy
:-)

----------------------------------------------
The contents of this post are my opinions only
If swallowed seek medical advice

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #1
1 5829
"Grant Allen" <Gr*********@towersoft.com.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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Ladvánszky Károly | last post: by
9 posts views Thread by Luis P. Mendes | last post: by
3 posts views Thread by Terry Asher | last post: by
16 posts views Thread by Don Starr | last post: by
3 posts views Thread by Sathyaish | last post: by
18 posts views Thread by Steve Litvack | last post: by
3 posts views Thread by Stef Mientki | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.