Search Postgresql Archives

To pass schemaname as a function parameter

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

 



Hi,
I wrote a function in plpgsql, to dispaly the student list.
In a Database all schemas contains studentlist table. so I wrote the function with schemaname as a parameter(text data type). My code is like
CREATE FUNCTION disp_fn(schemaname text) AS $$
BEGIN
    SELECT * FROM schemaname.studentlist;
END;
$$ LANGUAGE plpgsql;

In the above function schemaname varaible does not taken.
Is there any way to pass schemaname as argument? Any idea would be much  appreciated.
 Thanks in Advance.
Regards
Softlinne

[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