Postgresql function returning record - accessing individual columns -
Postgresql function returning record - accessing individual columns -
i have function f_product_price(lab uuid, price_list uuid, product_class uuid), returns record of useful items. if utilize function in clause, works fine in version 9.3:
select a.item_name, pl.base_price, .... lab l, items a, f_product_pric(l.id, l.price_list, a.product_class) pl lab.guid=? .....
but need in version 9.2, returns error:
there entry table "pl", cannot referenced part of query.
know how modify select? purposes sufficient access individual item name in select list :
select a.item_name, f_product_pric(l.id, l.price_list, a.product_class).base_price, .... lab l, items ....... lab.guid=? .....
but returns syntax error @ or near "." right syntax?
i have written this:
select a.item_name, (select base_price f_product_pric(l.id, l.price_list, a.product_class)) base_price lab l, items lab.guid=? .....
function postgresql record
Comments
Post a Comment