| From: | Dennis Gearon <gearond(at)cvc(dot)net> |
|---|---|
| To: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: don't understand something about backslashes |
| Date: | 2003-03-20 20:06:10 |
| Message-ID: | 3E7A1F32.6030405@cvc.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I print the string out before sending it to the p-l engine, and they are
there.
Where are they being interpreted as escaping, and removed:
PHP
ADODB (the php library I'm using)
Postgres?
Obviously, I'm looking on this list to see if they get removed by the
libpq library or the backend.
I didn't know escaping chars were removed ...... makes sense though.
Stephan Szabo wrote:
> 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.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Darko Prenosil | 2003-03-20 20:10:04 | Re: Handling Blobs with libpq |
| Previous Message | Stephan Szabo | 2003-03-20 19:56:57 | Re: don't understand something about backslashes |