473,608 Members | 1,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DROP TRIGGER permission

Hello,

Dropping a trigger is permitted if the user is the owner of the table
for which the trigger is defined.

In a plpgsql function, used by different users, I need to disable some
triggers for a short period of time. With the pgsql user login, I can
succesfully drop and create the trigger again (after locking the tables
for which I drop triggers), but unfortunately this not possible with a
different user login, since they are not the owner of the table.

What could I do in this situation?

Thanks

Philippe Lang

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #1
1 2015
On Mon, 2004-09-06 at 09:23, Philippe Lang wrote:
Hello,

Dropping a trigger is permitted if the user is the owner of the table
for which the trigger is defined.

In a plpgsql function, used by different users, I need to disable some
triggers for a short period of time. With the pgsql user login, I can
succesfully drop and create the trigger again (after locking the tables
for which I drop triggers), but unfortunately this not possible with a
different user login, since they are not the owner of the table.

What could I do in this situation?


Create another function to do the job and call it from inside your
plpgsql function. The second function should be created by the user
that owns the table and should be created with the SECURITY DEFINER
option so that it will run with the permissions of the user that created
it rather than those of the user invoking it.

--
Oliver Elphick ol**@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
=============== =============== ==========
"Behold, I stand at the door, and knock; if any man
hear my voice, and open the door, I will come in to
him, and will sup with him, and he with me."
Revelation 3:20
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
11215
by: Lauren Quantrell | last post by:
Is there a way to create a text file (such as a Windows Notepad file) by using a trigger on a table? What I want to do is to send a row of information to a table where the table: tblFileData has only one column: txtOutput I want to use the DB front end (MS Access) to send the text string to the SQL backend, then have the SQL Server create a file to a path, such as F:/myfiledate.txt that holds the text in txtOutput, then the trigger...
4
5762
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
2
4224
by: Matt | last post by:
The following code won't work, because onchange event is not trigger when drop down size = 1. But if I make the size="2" or greater, then it will work. Is that true? please advise. thanks!! <script type="text/javascript"> function showRange() { alert("showRange"); } </script> <SELECT NAME="range" SIZE="1" onchange="showRange();">
4
2194
by: Qingdong Z. | last post by:
I have a VS.NET windows application which use drag-drop feather. It works fine when application start, but stops working after application run one or two days. The application is related to Video process, CPU/Memory extensive. The drag-drop is in a new windows form. It drags from TreeView Control to other control in the same form. It cannot trigger ItemDrag event of TreeView after drag-drop feather die. Can you give me any idea? Thanks.
2
1949
by: Curtis | last post by:
I have a toolbar and, at run time, putting on a dropdown control and adding items. All is ok, but I don't know how to catch the click event. The items are there on the drop down. They are created dynamically so I don't know what they are at design time. How do I know when one of them have been selected/clicked?
1
1109
by: Brad | last post by:
Okay, I am learning about Drag/Drop operations so I am green when it comes to this. I have a form that draws several optional labels that are single-bordered. I also have a dozen colored labels that I want to drop over these "drawn" labels and on the drop, I want to color the "drawn" label the color of the dragged label. Make sense? The problem I am running into is based on certain criteria these "drawn" labels are named and can...
1
2449
by: Thomas Chille | last post by:
Hello! I have a Problem. A table with a ForeignKeyRef exits. The Name of the field with this FK-Constraint is 'id_employee' because it is referencing the field 'id_employee' in 'public.sd_employee'. I drop this column of the table with cascade in a script: ALTER TABLE public.sd_messaging_participant DROP COLUMN id_employee CASCADE;
0
1578
by: chris | last post by:
I've written a C# trigger on Developer_Box, using VS 2005 Professional. I need to deploy it on Test_Server, running SQLServer 2005. It compile fine, and the references to the appropriate database and table are correct. First attempt: You do not have CREATE Trigger permission.
0
8069
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8011
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8488
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8358
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6017
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5482
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4036
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2479
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1339
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.