Search Postgresql Archives

Re: Pl/pgsql function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>From: pgsql-general-owner@xxxxxxxxxxxxxx
[mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Nick Raj
>>Sent: Saturday, June 04, 2011 10:04 AM
>>To: pgsql-general@xxxxxxxxxxxxxx
>>Subject:  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.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux