Re: Passing TEXT variable to a function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Betsy Barker <betsy(dot)barker(at)supportservicesinc(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Passing TEXT variable to a function
Date: 2004-08-24 21:23:49
Message-ID: 12193.1093382629@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Betsy Barker <betsy(dot)barker(at)supportservicesinc(dot)com> writes:
> Here is the call:

> FOR getpercentiles IN EXECUTE ''SELECT * FROM get_facility_percentiles(''||wagerateid_list||'')'' LOOP
> -- RAISE NOTICE ''DONE CALLING FUNCTION '';
> END LOOP;

You want something like

FOR getpercentiles IN EXECUTE ''SELECT * FROM get_facility_percentiles(''||quote_literal(wagerateid_list)||'')'' LOOP

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2004-08-24 21:28:50 Re: Passing TEXT variable to a function
Previous Message operationsengineer1 2004-08-24 20:44:02 PGSQL and XML