postgres query function that returns a recordset

If the postgres function returns setof record, using select to directly query the function will report an error:

[42601] Error: A field definition list needs to return the function location of "record": 16

Use the following method to query:

            select * from func_logistcs_price_for_stock_picking(%s, %s, %s,%s) f (price_trans float, price_site float);

Guess you like

Origin www.cnblogs.com/qianxunman/p/12716077.html