Another similar situation that I'll bring here first:
I want to do:
SELECT createdid, eventresult
FROM createvehiclesaleimport() er
INTO targetid, evtresult;
But this gives a function compilation error: ' "evtresult" is not a scalar
variable '
createdid/targeted are boolean
eventresult/evtresult are CompositeType
createvehiclesaleimport() returns (Boolean, CompositeType)
I can do:
SELECT createdid, (eventresult).prop1, (eventresult).prop2
FROM createvehiclesaleimport() er
INTO targetid, evtresult.prop1, evtresult.prop2
(with or without the 'er' alias)
What's the magic syntax to allow me to chain "eventresult/evtresult" without
having to explicitly address it's scalar components. This is different than
the other situation in that the called function now returns both a scalar as
well as a composite type whereas the other behavior occurred when the sole
output for the called function was a compositetype.
9.0.3/plpgsql
Thanks.
David J