Currently we have a database per customer approach to our database methodology. In this we have the customer tables in the public schema. We create restrictions by having views in different schemas and modifying the search path. (restriction, public).
We are investigating having a scheme of having multiple customers in the same database and each of them having their own schema ( restriction, custName ).
Is there a way to have a generic query to a custName table by referencing its position in the search_path?
Example
select * from mytable; -- Gives restricted answers
select * from super.mytable -- Gives custName answers
Currently this is done by public.mytable, but I am curious if there is a generic way without having to know the custName schema.
Thanks
Woody