Re: Passing a String with special character as an input - Mailing list pgsql-general

From John R Pierce
Subject Re: Passing a String with special character as an input
Date
Msg-id 4CECA28B.3010402@hogranch.com
Whole thread Raw
In response to Passing a String with special character as an input  (akp geek <akpgeek@gmail.com>)
List pgsql-general
On 11/23/10 12:34 PM, akp geek wrote:
> Hi -
>
>            This is related to my earlier post. For the function I am
> passing a string. But the string some time has a single quote inside
> the string like "IT's a String Test" , How can I handle that, can you
> please help?
>

at the SQL level, pass it as a parameter.

like, in perl...

my $sth = $dbh->prepare('select test_repl(?);');
$sth->execute("It's a String Test");

(or my $sth->execute('It\'s a String Test'); ...)







pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Passing a String with special character as an input
Next
From: c k
Date:
Subject: Re: plpyhton