Re: [BUGS] BUG #2228: escaped single quotes choke spi_exec_query in plperlu

2006-02-01 Thread Tom Lane
michael <[EMAIL PROTECTED]> writes: > On Wed, 1 Feb 2006, Tom Lane wrote: >> It's hardly a bug that you get a syntax error when $data contains >> a single quote. It's up to you to construct a well-formed query >> string to give to spi_exec_query, and this code is not doing that. > As I understand

Re: [BUGS] BUG #2228: escaped single quotes choke spi_exec_query in plperlu

2006-02-01 Thread Tom Lane
"Michael Lush" <[EMAIL PROTECTED]> writes: > CREATE OR REPLACE FUNCTION quote_bug(text) RETURNS text AS > $$ >$data = $_[0]; >$sql = "SELECT * > FROM test > WHERE foo = '$data'"; >$rv_unique = spi_exec_query($sql); It's hardly a bug that you get a syntax erro

[BUGS] BUG #2228: escaped single quotes choke spi_exec_query in plperlu

2006-02-01 Thread Michael Lush
The following bug has been logged online: Bug reference: 2228 Logged by: Michael Lush Email address: [EMAIL PROTECTED] PostgreSQL version: 8.1.2 and 8.0.3 Operating system: freeBSD 4.9 Description:escaped single quotes choke spi_exec_query in plperlu Details: I've