Hello
you can't simply iterate over record in plpgsql. You can use a some
toolkits like PLToolkit, or different PL language like PLPerl, or some
dirty trick
http://okbob.blogspot.com/2010/12/iteration-over-record-in-plpgsql.html
regards
Pavel Stehule
2011/2/16 arthur_info :
>
> Hello,
>
> I've
Στις Wednesday 16 February 2011 18:18:19 ο/η arthur_info έγραψε:
>
> Hello,
>
> I've got the following function and I want to access the fields values of my
> record by index. The problem is that my select is retrieving each record
> line with all values and not each one of each row on my view...
Very interesting... But with information_schema.columns is easier... Thanks
anyway...
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Retrieve-the-column-values-of-a-record-without-knowing-the-names-tp3387932p3390948.html
Sent from the PostgreSQL - sql mailing list arch
Wow, how I didn't think about this solution? Thanks a lot! So easy...
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Retrieve-the-column-values-of-a-record-without-knowing-the-names-tp3387932p3390950.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com
Wow, I don't know if I exposed the problem in the right way, but I'm not
achieving the solution with information_schema... Let me show the function:
CREATE OR REPLACE FUNCTION fc_teste_tce2(codigo_aluno integer)
RETURNS character varying AS
$BODY$
DECLARE
reg record;
reg2 record;
msg cha