Redirect sequence access to different schema

Поиск
Список
Период
Сортировка
От Magnus Reftel
Тема Redirect sequence access to different schema
Дата
Msg-id 51D79104-16E2-4A35-B5AC-9616B3A320E4@gmail.com
обсуждение исходный текст
Ответы Re: Redirect sequence access to different schema  (Joe Conway <mail@joeconway.com>)
Список pgsql-general
Hi all,

I'm trying to inject some behavior via rules between an application and a table schema, preferably without modifying
eitherof them. Using views, I'm able to have a query that is run with one schema as the search_path to actually run
againsta table in a different schema. Is that also possible for sequences somehow? I tried creating a view like so: 

create view myseq as select * from other_schema.foo_id_seq;

but when I run "select nextval('myseq');" I get an error saying that myseq "is not a sequence". What other options are
there?

Best Regards
Magnus Reftel


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

Предыдущее
От: Lyle
Дата:
Сообщение: Re: DROP CONSTRAINT IF EXISTS - simulating in 7 and 8?
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Redirect sequence access to different schema