Re: Select + Functions + Composite Types: Behavior

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: Select + Functions + Composite Types: Behavior
Дата
Msg-id 01eb01cbcb12$3064bfb0$912e3f10$@yahoo.com
обсуждение исходный текст
Ответ на Re: Select + Functions + Composite Types: Behavior  ("David Johnston" <polobo@yahoo.com>)
Список pgsql-general
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




В списке pgsql-general по дате отправления:

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Select + Functions + Composite Types: Behavior
Следующее
От: Ruben Blanco
Дата:
Сообщение: Heavy queries not run by user application