| От | Holger Krug |
|---|---|
| Тема | Re: Different views with same name for different users |
| Дата | |
| Msg-id | 20020116155028.A22911@dev12.rationalizer.com обсуждение исходный текст |
| Ответ на | Different views with same name for different users ("Harald Massa" <HaraldMassa@ghum.de>) |
| Список | pgsql-general |
On Wed, Jan 16, 2002 at 02:21:39PM +0100, Harald Massa wrote: > i've got a table of around 10.000 records. > > Users A, B, C are allowed to see all the records > > user D only some > user E only some others > > Which is the most elegant way to do this? > (is there any way at all????) You cannot create different views with the same name in one PostgreSQL database. Hence the first answer is: there is no way. Nevertheless that's not the right answer. You can create only one view: CREATE VIEW PERS as SELECT * FROM TOTALDATABASE where (criteria) Within criteria you can check the user (`current_user') and return `true' or `false' depending on the record at hand and the current user. -- Holger Krug hkrug@rationalizer.com
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера