Обсуждение: Escaped Characters (Quotes, etc...)

Поиск
Список
Период
Сортировка

Escaped Characters (Quotes, etc...)

От
Дата:
hi all,

when i run a pgadmin3 query and select * from a table,
shouldn't the " mark appear like this : \" ?

right now it is appearing as it is entered.  i'm using
adodb's qstr() function and i thought it added the
backslashes to the appropriate characters.  however,
they don't show up in pgadmin3's query or when i print
the data to a web browser.

is something fishy going on here or am i missing something?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: Escaped Characters (Quotes, etc...)

От
Tom Lane
Дата:
<operationsengineer1@yahoo.com> writes:
> when i run a pgadmin3 query and select * from a table,
> shouldn't the " mark appear like this : \" ?

No, what for?

You have to escape quotes that are going to be put into a string literal
in a SQL command string.  But data coming out of the server is not in a
SQL command string and so it doesn't need that layer of quoting.

            regards, tom lane