| From: | Stefan Leitich <steffn(at)gmx(dot)at> |
|---|---|
| To: | |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: adressing column |
| Date: | 2003-10-01 12:01:16 |
| Message-ID: | 3F7AC20C.4040600@gmx.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
thanx a lot.
i thought much to complicated!
this will work in my case perfectly!
Richard Huxton wrote:
>On Wednesday 01 October 2003 11:20, Stefan Leitich wrote:
>
>
>>i have the following function:
>>
>>
>[snip code]
>
>
>>now i am searching for a way, to access my_column in my_record (now it
>>just works if my_column = 'col')
>>can anyone help please!
>>
>>
>
>That's not going to work in plpgsql at the moment. Because it's "compiled", it
>has problems with things like this.
>
>The usual answer is to use pltcl or some other more dynamic language.
>
>In you particular example you could just build your execute statement as:
> ... || my_column || ' AS foo FROM ' || ...
>
>Then you can access the column as "foo"
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Huxton | 2003-10-01 12:36:11 | Re: Current time inside Transactions |
| Previous Message | Daniel Schuchardt | 2003-10-01 11:51:41 | Current time inside Transactions |