Re: Escape handling in COPY, strings, psql - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Escape handling in COPY, strings, psql
Date
Msg-id 429A9246.7030902@familyhealth.com.au
Whole thread Raw
In response to Re: Escape handling in COPY, strings, psql  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Escape handling in COPY, strings, psql
List pgsql-hackers
> I think we can tell people in 8.1 that they should modify their
> applications to only use '', and that \' might be a security problem in
> the future.  If we get to that then using ESC or not only affects input
> of values and literal backslashes being entered, and my guess is that
> 90% of the backslash entries that want escaping are literal in the
> application and not supplied by program variables.  In fact, if we
> disable backslash by default then strings coming in only have to deal
> with single quotes (like other databases) and the system is more secure
> because there is no special backslash handling by default.

I can tell you right now this will be a problem :)  There are loads of 
PHP ppl who use addslashes() instead of pg_escape_string() to escape data.

Chris



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Escape handling in COPY, strings, psql
Next
From: Mark Kirkwood
Date:
Subject: Re: pg_buffercache causes assertion failure