Re: Enable/Disable Trigger per single transaction
От | Duncan Garland |
---|---|
Тема | Re: Enable/Disable Trigger per single transaction |
Дата | |
Msg-id | MBEPKEEDMKGCDODFKLPPIEOPDLAA.duncan.garland@ntlworld.com обсуждение исходный текст |
Ответ на | Enable/Disable Trigger per single transaction ("Derrick Betts" <list@blueaxis.com>) |
Список | pgsql-novice |
I don't know if there's a clever way to do it, but the user can be identified via the pseudo-column user. e.g. SELECT DISTINCT user FROM team; current_user -------------- dev (1 row) ( user is not a column in team. ) You could incorporate that into the trigger logic. Regards Duncan -----Original Message----- From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Derrick Betts Sent: 27 January 2007 16:49 To: pgsql-novice@postgresql.org Subject: [NOVICE] Enable/Disable Trigger per single transaction Assuming we have well over 1000 users accessing the database through a web application. We have a row-level trigger set up on table "alpha" that gets executed after updates. I was wondering if there is a way to temporarily disable a trigger on table "alpha" for a single user, even though there may be 999 other users sending transactions to the database that need the trigger to remain in place? For example, I only want the trigger disabled for one single transaction (using commands inside that transaction) while the trigger still gets fired properly for the other 999 transactions that hit the database simultaneously. Is this possible at present? Thank you for your insights, Derrick ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend
В списке pgsql-novice по дате отправления: