Search Postgresql Archives

Re: Constraints involving a system table

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

 



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@xxxxxxxxx

Web: http://www.carto.net/neumann/
SVG Examples: http://www.carto.net/papers/svg/samples/
SVG.Open: http://www.svgopen.org/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[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