473,786 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running function as superuser

2 New Member
How I can run a function written in plpgsql as superuser when I'm logged into the database as normal user with a restrict access to tables?
Sep 17 '08 #1
2 3957
rski
700 Recognized Expert Contributor
1) you can set your role to admin and run a function (if you have enough strong privileges)
2) you can create this function from admin account with SECURE DEFINER option. Everybody would run this functions with admin rights.
Sep 17 '08 #2
ildiff
2 New Member
Problem solved with the security definer. Thanks a lot rski!
Sep 17 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1869
by: Rudy Metzger | last post by:
------_=_NextPart_001_01C34573.71AC6F2C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dear all, =20 Is there a way to start mysqld in a way, that say only a superuser can
2
1707
by: zuhans | last post by:
hello, i'm rather new to postgresql and am now standing in front of a big problem. if i want to host my database on any provider out there, i don't now see any chance to get my own right to insert new users into my db. because: i'd only be able to do this, when i had the rights to "createuser", but that would mean, that i'd have the superuser-rights for the whole db's in "public" - if there is only this base-schema.
1
7767
by: marcelo Cortez | last post by:
Hi folks My application fail with 'Non-superuser connection limit exceeded' error , the client application is connected via ODBC AND GPF MESSAGE appear there. the 'Non-superuser connection limit exceeded' what'wrong?.
1
5786
by: Ennio-Sr | last post by:
Hi all! Testing a script where I need to make sure that postgresql is running before passing a <psql dbasename -c "insert into ..." > instruction I faced this curious behaviour: This is the relevant content of the script: ------------------ #!/bin/bash /usr/lib/postgresql/bin/pg_ctl status -D /var/lib/postgres/data >/dev/null 2>&1 rtn=$?
10
1614
by: nd02tsk | last post by:
Hello I know it is possible to time isolated queries through the settting of the \timing option in psql. This makes PgSQL report the time it took to perform one operation. I would like to know how one can get a time summary of many operations, if it is at all possible. Thank you.
1
2154
by: Ed L. | last post by:
I'd like to have a DB client connect using a username ('psuedodba') different from the creator/owner ('dba') of the DB and its tables, but still have that username be able to do everything the creator/owner can do (alter tables, drop databases, etc). It appears that "createuser -d -a psuedodba" works for this purpose. Are there circumstances where 'psuedodba' lacks powers that 'dba' has to create/destroy/alter/update/insert/delete? ...
1
6025
by: Anonieko | last post by:
Query: How to display progress bar for long running page Answer: Yet another solution. REFERENCE: http://www.eggheadcafe.com/articles/20050108.asp My only regret is that when click the browser back button, it loads the progress bar again. Any solution to this?
1
3032
by: james2 | last post by:
I am trying to write a perl script that will do remote machine. I have done user loging using simple command; $telnet->login('test', 'test123'); But now I want to do root login or superuser login. So I tried the superuser command, $telnet->cmd("su"); But I am not able to send the password , like,
3
1887
by: chernevik | last post by:
Here is a newbie question: how do I get the server examples in the Preview chapter of "Progamming Python" (Lutz) to run? The code is supposed to be a little webserver on which to run examples, but when I run it it I get "permission denied". Running it as root gets "address already in use". Here is the code (it's example 2.32); comments are from Lutz, not me: webdir = '.' # where your html files and cgi-bin script directory live
0
9647
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
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
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...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4066
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
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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.