Re: Passing TEXT variable to a function

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

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-novice by date

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