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.
do i understand this right?
if yes: what is a common approach to manage just own users if there is
the situation, that i have a changing amount of them?
btw: why isn't it possible to have (in a future release) a
createuser-right just for single databases and to have one
root/super-user for everydb?
greetings from today very sunny autria
hans
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend 2 1706 zu****@iname.co m wrote: 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.
do i understand this right?
Well - what does the contract with your provider state? Do you get one
user or as many as you like? It's common to get one DB and one user.
if yes: what is a common approach to manage just own users if there is the situation, that i have a changing amount of them?
Usually a simple wrapper - command-line or web-form. Checks you can only
add users to a given database.
btw: why isn't it possible to have (in a future release) a createuser-right just for single databases and to have one root/super-user for everydb?
No particular reason AFAIK. Someone was suggesting it on the hackers
list, but I'm not sure if anything came of it. If you are really
interested, check the archives on the hackers list and see what happened.
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match zu****@iname.co m wrote: 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.
do i understand this right?
No.
-- Function: create_user(nam e)
CREATE OR REPLACE FUNCTION create_user(nam e)
RETURNS bool AS
'
DECLARE
PWD VARCHAR;
CMD VARCHAR;
BEGIN
PWD := \'INITIALPWD\';
IF EXISTS(SELECT * FROM pg_user WHERE usename = $1) THEN
RETURN FALSE;
END IF;
CMD := \'CREATE USER "\' || $1 || \'" WITH ENCRYPTED PASSWORD \' || PWD\';
EXECUTE CMD;
RETURN TRUE;
END;
'
LANGUAGE 'plpgsql' VOLATILE SECURITY DEFINER;
-- Note: "SECURITY DEFINER". This function was created by a user that
does have create user privileges.
--Berend Tober
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
by: MLH |
last post by:
Silly me. I thought that if I clicked Tools, Security, Encrypt
database MyDB.mdb to Ncrypt.mdb I would not be able
to read the module code if opening Ncrypt.mdb inside
A97 later. I've found that was incorrect.
What's a simple approach I can use as a self demonstration
of the difference between an unencrypted mdb and an encrypted
mdb? Is it possible that I'll notice a difference if I enter the
following on the command prompt?
|
by: Benny Ng |
last post by:
Hi,All,
Export Method:
-------------------------------------------------------------------------
strFileNameExport = "Results"
Response.Clear()
Response.Buffer = True
Response.ContentType ="application/vnd.ms-excel" 'application/msword
|
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?.
|
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.
| |
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? ...
|
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,
|
by: Dodger |
last post by:
Okay, background... yes, I am another of those evil, spurned, damnable
Perl mongers, but I'm not trying to start a flamewar, I'm juust tryung
to understand something...
I can write a script in Perl like so, and it's pretty to me (and the
using of the heredocs I think does defend perl against many arguments
withthe HTML being all escaped and explicit returns and stuff -- which
I can see... 'print "<p class=\"text\">stuff</p>\n";' is...
|
by: Peter |
last post by:
Hi,
I have a problem with Listview using checkboxes.
If i check items by code BEFORE the form is shown the Listview.Items
are confused during the ItemChecked Event !!!
After showing the form every thing works fine: checking items by code
|
by: ildiff |
last post by:
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?
|
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,...
| |
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |