Re: Passing TEXT variable to a function
| От | Josh Berkus |
|---|---|
| Тема | Re: Passing TEXT variable to a function |
| Дата | |
| Msg-id | 200408241428.50672.josh@agliodbs.com обсуждение исходный текст |
| Ответ на | Passing TEXT variable to a function (Betsy Barker <betsy.barker@supportservicesinc.com>) |
| Ответы |
Re: Passing TEXT variable to a function
|
| Список | pgsql-novice |
Betsy,
> The variable is defined as TEXT, and I'm trying to pass it to a function
> that is setup to accept a TEXT parameter. Here is the call:
First off, let me say that you may be better off using a different strategy
for this. But I don't know much about your application, so you may not.
> FOR getpercentiles IN EXECUTE ''SELECT * FROM
> get_facility_percentiles(''||wagerateid_list||'')'' LOOP -- RAISE
> NOTICE ''DONE CALLING FUNCTION '';
Aha, syntax error, you forgot the nested quotes:
FOR getpercentiles IN EXECUTE ''SELECT * FROM get_facility_percentiles(''''''
|| wagerateid_list || '''''')'' LOOP
FWIW, version 8.0 will have a feature to do away with the nested-quote-mania.
--
Josh Berkus
Aglio Database Solutions
San Francisco
В списке pgsql-novice по дате отправления: