Re: Passing TEXT variable to a function - Mailing list pgsql-novice

From Betsy Barker
Subject Re: Passing TEXT variable to a function
Date
Msg-id 20040824172859.62ccaf9c.betsy.barker@supportservicesinc.com
Whole thread Raw
In response to Re: Passing TEXT variable to a function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
quote_literal() worked. Thank you both!

On Tue, 24 Aug 2004 17:33:08 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Josh Berkus <josh@agliodbs.com> writes:
> > Aha, syntax error, you forgot the nested quotes:
>
> > FOR getpercentiles IN EXECUTE ''SELECT * FROM get_facility_percentiles(''''''
> > || wagerateid_list || '''''')'' LOOP
>
> She really wants quote_literal(), instead, so that the function doesn't
> break if someone passes a value that contains quotes ...
>
>             regards, tom lane
>


--
Betsy Barker
IT Manager
Support Services, Inc
(720)489-1630 X 38

pgsql-novice by date:

Previous
From: Josh Berkus
Date:
Subject: Re: PGSQL and XML
Next
From: William Yu
Date:
Subject: Re: DISTINCT ordering