I have a function f_product_price(lab uuid, price_list uuid, product_class uuid), that returns record of useful items. If I use the function in FROM clause, it works fine in version 9.3:
select a.item_name, pl.base_price, ....
from lab l, items a, f_product_pric(l.id, l.price_list, a.product_class) as pl
where lab.guid=? .....
but it I need it in version 9.2, where it returns error:
There is an entry for table "pl", but it cannot be referenced from this part of the query.
Does anybody know how to modify the select?
For my purposes is sufficient to access individual item by name in select list like this :
select a.item_name, f_product_pric(l.id, l.price_list, a.product_class).base_price, ....
from lab l, items a .......
where lab.guid=? .....
But it returns syntax error at or near "."
What is the correct syntax?
I would have written it like this: