To pass schemaname as a function parameter - Mailing list pgsql-general

From Kalai R
Subject To pass schemaname as a function parameter
Date
Msg-id 762e576c0909030428v255b628bkcd089fc6874c137f@mail.gmail.com
Whole thread Raw
Responses Re: To pass schemaname as a function parameter  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: "Wellmann, Harald"
Date:
Subject: Re: Subselect problem
Next
From: "A. Kretschmer"
Date:
Subject: Re: To pass schemaname as a function parameter