From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Juan Miguel Paredes <juan(dot)paredes(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Composite type within a composite type? |
Date: | 2005-07-18 21:52:33 |
Message-ID: | 17263.1121723553@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Juan Miguel Paredes <juan(dot)paredes(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Dawid Kuroczko | 2005-07-19 00:02:28 | Re: Converting MySQL tinyint to PostgreSQL |
Previous Message | Tom Lane | 2005-07-18 21:48:54 | Re: index row size exceeds btree maximum, 2713 - Solutions? |