Re: Isolating a record column from a PL-Pgsql function call ?

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Isolating a record column from a PL-Pgsql function call ?
Date: 2008-12-16 19:51:30
Message-ID: 20081216195130.GA11182@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gauthier, Dave <dave(dot)gauthier(at)intel(dot)com> schrieb:

> Hi:
>
>
>
> I have a PL-Pgsql function that returns a record of a type that have 4 elements
> (columns). Let’s say the first element/column is called “id_num”. Is there a
> way I can specify the id_num element of the record returned from iside a query?
>
>
>
> For example, select col1 from thetable where my_plpgsql_fn(col2).id_num = 123;

I think, you should rewrite your function to hand over the id_num as
additional parameter. But i'm not sure if i understand you corrently. Is
this a setof-returning function?

Please, show us your real function, maybe someone can help you more.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gauthier, Dave 2008-12-16 20:03:05 Re: Isolating a record column from a PL-Pgsql function call ?
Previous Message Raymond O'Donnell 2008-12-16 19:24:06 Re: TIMESTAMP with a timezone offset