Search Postgresql Archives

Re: Backslash problems with 8.1.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Schumacher <matt.s@xxxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux