Search Postgresql Archives

Redirect sequence access to different schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm trying to inject some behavior via rules between an application and a table schema, preferably without modifying either of them. Using views, I'm able to have a query that is run with one schema as the search_path to actually run against a 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux