Re: database/schema level triggers?

Поиск
Список
Период
Сортировка
От Paul Newman
Тема Re: database/schema level triggers?
Дата
Msg-id D5F7521105A39145BEA6A6F47AEFFA8837B9E5@sbserver.tripoint.local
обсуждение исходный текст
Ответ на database/schema level triggers?  ("Tomi NA" <hefest@gmail.com>)
Список pgsql-general
Hi,
This is precisely what I'm after .. could you possibly give me an
example ?

Kind Regards

Paul Newman

-----Original Message-----
From: Jim Nasby [mailto:jnasby@pervasive.com]
Sent: 08 March 2006 22:18
To: Michael Glaesemann
Cc: Tomi NA; pgsql-general
Subject: Re: [GENERAL] database/schema level triggers?

There's nothing like that, but the good news is that you can have
multiple triggers call the same trigger function, and it wouldn't be
*too* hard to script the creation of all those triggers based on the
info in information_schema.tables.

On Mar 8, 2006, at 9:02 AM, Michael Glaesemann wrote:

> Please remember to cc the list. I'm forwarding this to the list in
> case someone has any suggestions.
>
> On Mar 8, 2006, at 23:53 , Tomi NA wrote:
>
>> On 3/8/06, Michael Glaesemann <grzm@myrealbox.com> wrote:
>> On Mar 8, 2006, at 22:11 , Tomi NA wrote:
>>
>> > Does anything like that exist in postgresql?
>> > It'd rid me of a whole lot of work if it did...and I'd still have
>> > plenty more to keep me busy. :)
>>
>> What do you mean by database/schema level triggers? Could you give an
>> example of what you're trying to do? Perhaps someone on the list has
>> experience doing something similar.
>>
>> Well, it seemed natural to me that I should be able to *not*
>> specify a target table for a trigger and so make a trigger fire on
>> any event in a wider context.
>> I've seen oracle users have at their disposal something along the
>> lines of:
>> CREATE TRIGGER my_trigger AFTER INSERT OR UPDATE OR DELETE ON
>> DATABASE EXECUTE something()
>> A similar construct on the schema level might be useful, as well.
>>
>> That's what I was interested in, but now I've gone and done most
>> of the boring, repetitive work anyway so it's now of academic or
>> possible future interest to me, instead of immediate interest. I'm
>> still eager to know, though. :)
>>
>> Regards,
>> Tomislav
>
> Michael Glaesemann
> grzm myrealbox com
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>

--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


В списке pgsql-general по дате отправления:

Предыдущее
От: "Paul Newman"
Дата:
Сообщение: Re: Triggers and Multiple Schemas.
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Triggers and Multiple Schemas.