From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Diego Sanchez" <dsanchez(at)roldansia(dot)com(dot)co> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Record Types Structure in PL/pgSQL |
Date: | 2007-06-07 13:08:32 |
Message-ID: | 162867790706070608p573fbae1l6623f0c2e4b02b49@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello
it isn't possible in plpgsql. Try other plperl or plpython
Regards
Pavel Stehule
2007/6/6, Diego Sanchez <dsanchez(at)roldansia(dot)com(dot)co>:
>
> Hi there.
>
> Is there any way of determining the actual structure of a record variable?
> E. g. I've written a small script to do some calculations over some fields
> with a dinamically generated query. It looks like this:
>
> create function foo(text) returns void as
> $$
> declare
> a_record record;
> my_query alias for $1;
> begin
> for a_record in execute my_query loop
> -- Do some calculations
> end loop;
> return;
> end;
> $$
> language plpgsql;
>
> The question is: how could I possibly get the field names and other
> information about the record a_record? I appreciate any suggestions or tips
> about this.
>
> Best regards.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2007-06-07 13:30:43 | Re: Limitations on 7.0.3? |
Previous Message | Ray Stell | 2007-06-07 12:48:07 | Re: failing to start posgresql. |