Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group