Query specific table using relative position in search path

Поиск
Список
Период
Сортировка
От George Woodring
Тема Query specific table using relative position in search path
Дата
Msg-id CACi+J=QBi1Mdw6dBbSz9wrfTU7rA4VPS1br0oWGsM0mb7aWySw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Query specific table using relative position in search path  (Sergey Konoplev <gray.ru@gmail.com>)
Список pgsql-sql
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 
iGLASS Networks
www.iglass.net

В списке pgsql-sql по дате отправления:

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: json and aggregate
Следующее
От: Michael Schmidt
Дата:
Сообщение: How to script inserts where id is needed as fk