passing text value with single quote to stored procedure

From: Prabhjot Sheena <prabhjot(dot)sheena(at)rivalwatch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: passing text value with single quote to stored procedure
Date: 2013-07-12 22:05:42
Message-ID: CAOf_bQYJ2JAym1wNQ3=iZdHNabawBGVUAfu-n9fGZAjJWg8BXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all
I am currently having an issue with passing a value with a single
quote in it to stored procedure

i am trying to pass this text value QA_SUMMER ' 2013_(EU/US) to stored
procedure text variable. it gives me error.

Here is more detail on this

My stored procedure is something like this

CREATE OR REPLACE FUNCTION load_stage_start_v1( p_name text)

when this value is passed to the function

select load_stage_start_v1('QA_SUMMER'2013_(EU/US)');

This gives an error. Is there a way to fix this issue.

And if i am sending this question to the wrong mailing list pls let me
know.

Thanks in advance

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-07-13 00:11:35 Re: passing text value with single quote to stored procedure
Previous Message ktewari1 2013-07-12 21:37:19 Build RPM from Postgres Source