Search Postgresql Archives

Re: Select + Functions + Composite Types: Behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux