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

Поиск
Список
Период
Сортировка
От Grant Allen
Тема Re: Any way to disable backslash as a string literal escape character?
Дата
Msg-id C01E7923DE7E6B4F96E232566F058D7277DC11@spitfire.towersoft.canberra
обсуждение исходный текст
Ответ на Any way to disable backslash as a string literal escape character?  ("Grant Allen" <Grant.Allen@towersoft.com.au>)
Список pgsql-general
Tom,

The big difference ... all DBs (at least, the ones I listed, including PostgreSQL) support the single quote as it's own
escapecharacter - so no difference when it comes to app porting (yes, PostgreSQL has the \' method as well, but ''
worksacross 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) :-)

Ciao
Fuzzy
:-)

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

> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Tuesday, 30 December 2003 15:09
> To: Grant Allen
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Any way to disable backslash as a
> string literal
> escape character?
>
>
> "Grant Allen" <Grant.Allen@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
>

В списке pgsql-general по дате отправления:

Предыдущее
От: "Chris Travers"
Дата:
Сообщение: Re: Is my MySQL Gaining ?
Следующее
От: Bret Busby
Дата:
Сообщение: Re: [pgsql-advocacy] Is my MySQL Gaining ?