From: | "David Johnston" <polobo(at)yahoo(dot)com> |
---|---|
To: | "'Nick Raj'" <nickrajjain(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Pl/pgsql function |
Date: | 2011-06-04 15:44:17 |
Message-ID: | 007901cc22ce$444a9e50$ccdfdaf0$@yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>>From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Nick Raj
>>Sent: Saturday, June 04, 2011 10:04 AM
>>To: pgsql-general(at)postgresql(dot)org
>>Subject: [GENERAL] Pl/pgsql function
>>
>>Second thing,
>>Suppose i defined a function test as
>>
>>select test('geom',the_geom,time) from tablename
>>.....
>>Inside body,
>>How can i get the tablename inside the body (because i haven't pass table
name to function)
>>......
>>end
Not possible; a function only has access to the specific things you provide
it. If you explain why you want the "tablename" maybe alternatives can be
suggested. The only time you get access to the table name is when you are
executing the function in the context of a trigger.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-06-04 16:41:48 | Re: Why are IDLE connections using cpu according to TOP. |
Previous Message | Rob Sargent | 2011-06-04 14:22:16 | Re: Pl/pgsql function |