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

From Tom Lane
Subject Re: Passing TEXT variable to a function
Date
Msg-id 12301.1093383188@sss.pgh.pa.us
Whole thread Raw
In response to Re: Passing TEXT variable to a function  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Passing TEXT variable to a function
List pgsql-novice
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

pgsql-novice by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Passing TEXT variable to a function
Next
From: Josh Berkus
Date:
Subject: Re: PGSQL and XML