| От | Tom Lane |
|---|---|
| Тема | Re: Backslash problems with 8.1.4 |
| Дата | |
| Msg-id | 3800.1149701186@sss.pgh.pa.us обсуждение |
| Ответ на | Backslash problems with 8.1.4 (Matthew Schumacher <matt.s@aptalaska.net>) |
| Ответы |
Re: Backslash problems with 8.1.4
|
| Список | pgsql-general |
Matthew Schumacher <matt.s@aptalaska.net> writes:
> I upgraded to postgres-8.1.4 and saw all of the backslash escape changes
> and understand why, but I can't figure out how to put a literal \' in
> the database.
You use the SQL-standard way, which is to repeat the quote mark:
'Meet at Joe''s house'
> The data is coming from PHP,
I have met your problem, and its name is addslashes(). Don't use it.
addslashes is exactly the security hole we are trying to plug.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера