creating variable views
От | Dado Feigenblatt |
---|---|
Тема | creating variable views |
Дата | |
Msg-id | 3B3CD71D.D35F928@wildbrain.com обсуждение исходный текст |
Список | pgsql-sql |
Hi. New to the list. I'm building a database that will hold data for many different projects. Some people, or groups of people, will have access to just the rows of data of their projects. Some are very granular. Let's use for this example the data about the people itself. Other than the administrators, I want people to see only their own data. Instead of creating a view for each person, is it possible to create a single view with variable data? CREATE VIEW user_info AS SELECT * FROM users WHERE user_name = pg_user where pg_user is the user name that person used to log into the database. Is there a way to get the user name in Postgresql? Even if the variable pg_user is not available, is it possible to create views using variables like that? Thanks. -- Dado Feigenblatt Wild Brain, Inc. Technical Director (415) 553-8000 x??? dado@wildbrain.com San Francisco, CA.
В списке pgsql-sql по дате отправления: