Re: don't understand something about backslashes

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: don't understand something about backslashes
Дата
Msg-id 20030320115548.D73004-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на don't understand something about backslashes  (Dennis Gearon <gearond@cvc.net>)
Ответы Re: don't understand something about backslashes  (Dennis Gearon <gearond@cvc.net>)
Список pgsql-general
On Thu, 20 Mar 2003, Dennis Gearon wrote:

> I have a varchar that is 64 wide. I prescape stuff like the '-'
> character to prevent SQL injection.
>
> Here is the EXACT field value that I inserted recently,for a test. It
> comes to approx 100 chars.
>
> '\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1\-1'::varchar,
>
> I insert that and get:
>
>     NO ERROR
>
> When I look at the record in phpPgAdmin, the slashes don't show up in
> the record.

The backslashes are escaping what follows.  If you want two backslashes
you need to double them probably.


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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: log_timestamp and SIGHUP?
Следующее
От: Dennis Gearon
Дата:
Сообщение: Re: don't understand something about backslashes