Re: Passing a String with special character as an input

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Passing a String with special character as an input
Date: 2010-11-24 05:28:43
Message-ID: 4CECA28B.3010402@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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'); ...)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message c k 2010-11-24 06:26:16 Re: plpyhton
Previous Message Pavel Stehule 2010-11-24 03:42:39 Re: Passing a String with special character as an input