[GENERAL] ALTER EVENT TRIGGER as non superuser

2015-06-02 Thread Andreas Ulbrich
I afraid there is a bug in ALTER EVENT TRIGGER: I run the following script: \set ON_ERROR_ROLLBACK ON BEGIN; CREATE FUNCTION event_trigger_function() RETURNS event_trigger AS $$ BEGIN RAISE NOTICE 'event_trigger_function'; END$$ LANGUAGE plPgSQL; CREATE EVENT TRIGGER a_ddl_trigger

Re: [GENERAL] TRIGGER TRUNCATE -- CASCADE or RESTRICT

2015-06-02 Thread Andreas Ulbrich
, Andreas Ulbrich <mailto:andreas.ulbr...@matheversum.de>> wrote: On 02.06.2015 16:20, Melvin Davidson wrote: You can use the following to list the triggers and see what functions they call. Then you can check pg_proc to see how TRUNCATE is used in prosrc. SELECT

Re: [GENERAL] TRIGGER TRUNCATE -- CASCADE or RESTRICT

2015-06-02 Thread Andreas Ulbrich
;mailto:laurenz.a...@wien.gv.at>> wrote: Andreas Ulbrich wrote: > I'm in a handle for a trigger for TRUNCATE. Is it possible to find out > whether the TRUNCATE TABLE ist called with CASCADE? I don't think there is. But you can find out the table where

[GENERAL] TRIGGER TRUNCATE -- CASCADE or RESTRICT

2015-06-01 Thread Andreas Ulbrich
Salvete! I'm in a handle for a trigger for TRUNCATE. Is it possible to find out whether the TRUNCATE TABLE ist called with CASCADE? regads andreas -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/p

Re: [GENERAL] Find out what on what function depends an index

2015-06-01 Thread Andreas Ulbrich
On 01.06.2015 16:15, Tom Lane wrote: Andreas Ulbrich writes: The question is the todo in the script: Is there a way to find out what indexes depends on what function? Direct dependencies would show up in pg_depend. Indirect ones wouldn't, since we don't analyze function bodies t

[GENERAL] Find out what on what function depends an index

2015-06-01 Thread Andreas Ulbrich
Salvete. If I have an expression based index (a fucntion call) then the index will become corrupt, if the function is changed. As the function developer, I do not know, who uses the function for an index, and as the user of the function in an index I do not know if the function is changed. So

Re: [GENERAL] Check constraint on foreign table using SQL function

2014-12-26 Thread Andreas Ulbrich
On 25.12.2014 23:50, Adrian Klaver wrote: On 12/25/2014 11:21 AM, Andreas Ulbrich wrote: Hey. In the first part I connect to testdb (the remote db). Here I create the schema 'andreas'. That the search_path correct is, shows the output of the pgplsql version. Yeah, that was a fals

Re: [GENERAL] Check constraint on foreign table using SQL function

2014-12-25 Thread Andreas Ulbrich
Hey. In the first part I connect to testdb (the remote db). Here I create the schema 'andreas'. That the search_path correct is, shows the output of the pgplsql version. Then, in the second part, I'm postgres (this db ist empty since compiling). The usermapping says, I wont to be andreas@test

[GENERAL] Check constraint on foreign table using SQL function

2014-12-25 Thread Andreas Ulbrich
Salvete! I've made the following observation: I have a foreign table (postgres_fdw) to a remote table B. On the remote table is a check constraint using a SQL-function with access to an other table. In the remote DB both tables and the check-function resist in a seperate schema "andreas". Th

Re: [GENERAL] Unary Operators

2013-09-19 Thread Andreas Ulbrich
On 18.09.2013 02:17, David Johnston wrote: Andreas Ulbrich wrote create operator ^- (leftarg = float, procedure = reciproce); works too, but create operator / (leftarg = float, procedure = reciproce); not. Do you mean the "^" operator or the "^-" operator? Rowan claims

[GENERAL] Unary Operators

2013-09-15 Thread Andreas Ulbrich
Salvete! I have the following problem. I'd like to define the operator symbol / as a left unary operator for reciprocal value of a number. I did this with a C-function and all the stuff around, but it does not work. Hiere is an extract and simplified example with the same error message as in m