Re: Constraints involving a system table
От | Andreas Neumann |
---|---|
Тема | Re: Constraints involving a system table |
Дата | |
Msg-id | 471F9400.6020607@carto.net обсуждение исходный текст |
Ответ на | Constraints involving a system table ("Andreas Neumann" <a.neumann@carto.net>) |
Список | pgsql-general |
ok - so the trigger is the problem. I am aware that one should not mess around with system tables. is there a workaround? Maybe creating a view or a function? Thanks, Andreas Richard Huxton wrote: > Andreas Neumann wrote: >> Hello, >> >> I would like to create a constraint that involves the system table. > > I'm afraid you can't (at present, anyway) > >> Why is this not working? What other privileges besides "SELECT" would one >> need to define a constraint? > > Well, you need to be able to add a trigger to the system table (which > you can't do), otherwise it can't check what to do when you delete > something from pg_namespace. > > I think there are two reasons for this: > 1. Adding a badly coded trigger to a system table can make your life > very difficult. > 2. PG uses a few shortcuts behind the scenes when accessing system tables. > > -- -- Andreas Neumann Böschacherstrasse 6 CH-8624 Grüt (Gossau ZH) Switzerland Phone: ++41-44-2736668 Email: a.neumann@carto.net Web: http://www.carto.net/neumann/ SVG Examples: http://www.carto.net/papers/svg/samples/ SVG.Open: http://www.svgopen.org/
В списке pgsql-general по дате отправления: