Search Postgresql Archives

Re: views to behave differently according to user and schema

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

 



Samuel Thoraval wrote:

Is it possible to change this behavior so that the VIEW will dynamically use the search_path variable (when the schema was not specifically set) ? In this case, when user nsp2 loggs in, the VIEW vtest would be using VIEW nsp2.test, when user nsp3 loggs in it would use VIEW nsp3.test, for user nsp1 TABLE nsp1.test ...

I don't think so. There's no guarantee that nsp1 and nsp2 have the same definition, which means the view could break depending on search_path.

You could create a separate view in each schema of course.

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[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