| От | Tom Lane |
|---|---|
| Тема | Re: Composite type within a composite type? |
| Дата | |
| Msg-id | 17263.1121723553@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Composite type within a composite type? (Juan Miguel Paredes <juan.paredes@gmail.com>) |
| Список | pgsql-general |
Juan Miguel Paredes <juan.paredes@gmail.com> writes:
> DECLARE
> res helpdesk.tp_res_conestadosdisponiblessoporte;
> BEGIN
> IF estadoactual = 'Abierto' THEN
> SELECT INTO res.filas *
> FROM tbl_estadosoporte
Without having looked at the code, I suspect that plpgsql just assumes
res.filas is of scalar type and so fails to match it up to the entire
SELECT INTO * list. (It's not obvious how to do "better" for arbitrary
combinations of scalar types, composite types, and user expectations...)
I'd recommend that you declare a row variable of type tbl_estadosoporte,
select into that, and then worry about constructing the larger composite
result.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера