Re: Can a view use a schema search_path?

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: Can a view use a schema search_path?
Дата
Msg-id CAPTjJmoy3eUV0iOFS10qAVZ9dWkRfy5JfGT1VQbXxSYqiM__XQ@mail.gmail.com
обсуждение исходный текст
Ответ на Can a view use a schema search_path?  (Adam Mackler <adammackler@gmail.com>)
Ответы Re: Can a view use a schema search_path?  ("David Johnston" <polobo@yahoo.com>)
Список pgsql-general
On Mon, Sep 17, 2012 at 7:06 PM, Adam Mackler <adammackler@gmail.com> wrote:
> Am I correct in concluding that there's no way to have a single view in the
> public schema that selects data from tables in different other schemas
> depending on my search_path at the time I execute a query involving that
> view?

I don't think so, as I've wanted something similar myself. The easiest
way I found is to create two views, in the same schemas as their
corresponding tables. It's double maintenance but it's cheap to run.

ChrisA


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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Can a view use a schema search_path?
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: Can a view use a schema search_path?