Re: [GENERAL] Create user trigger?

2008-03-25 Thread Decibel!
Dropping the slony list. On Mar 18, 2008, at 5:32 AM, Glyn Astill wrote: We're setting up 3 servers replicating using slony. I was wondering if it'd be possible for me to create a set of triggers that fire whenever a user is created/dropped/modified on one of the servers that goes and

Re: [GENERAL] Create user trigger?

2008-03-25 Thread Bruce Momjian
Decibel! wrote: Dropping the slony list. On Mar 18, 2008, at 5:32 AM, Glyn Astill wrote: We're setting up 3 servers replicating using slony. I was wondering if it'd be possible for me to create a set of triggers that fire whenever a user is created/dropped/modified on one of the

[GENERAL] Create user trigger?

2008-03-18 Thread Glyn Astill
Hi Chaps, We're setting up 3 servers replicating using slony. I was wondering if it'd be possible for me to create a set of triggers that fire whenever a user is created/dropped/modified on one of the servers that goes and performs the same action the other two servers. Does that sound

[GENERAL] Create user

2007-06-29 Thread Ashish Karalkar
Hello All, I am trying to create a user and i dont understand why it is showing me any massage even after giving parameter -e to the command. command : C:\Program Files\PostgreSQL\8.2\bincreateuser ashish -S -d -R -l -P -E -e -U postgres Enter password for new role: Enter it again:

Re: [GENERAL] Create user

2007-06-29 Thread A. Kretschmer
am Fri, dem 29.06.2007, um 13:31:03 +0530 mailte Ashish Karalkar folgendes: Hello All, I am trying to create a user and i dont understand why it is showing me any massage even after giving parameter -e to the command. Maybe you should use -q: -q --quiet Do not display a

Re: [GENERAL] Create user

2007-06-29 Thread Dave Page
Ashish Karalkar wrote: Hello All, I am trying to create a user and i dont understand why it is showing me any massage even after giving parameter -e to the command. command : C:\Program Files\PostgreSQL\8.2\bincreateuser ashish -S -d -R -l -P -E -e -U postgres Enter password for

Re: [GENERAL] Create user

2007-06-29 Thread Albe Laurenz
Ashish Karalkar wrote: I am trying to create a user and i dont understand why it is showing me any massage even after giving parameter -e to the command. command : C:\Program Files\PostgreSQL\8.2\bincreateuser ashish -S -d \ -R -l -P -E -e -U postgres Use -q instead of -e. Yours,

[GENERAL] Create user or role from inside a function?

2006-09-01 Thread Dan
Hey, I am running PostgreSQL 8.1.4 and I want to create a user from inside a function. Is this possible in 8.1? Ive found quite a few references on google using EXECUTE, but this seems relevant to earlier versions, not 8.1. I have a function like this: CREATE FUNCTION user_create (un varchar,

Re: [GENERAL] Create user or role from inside a function?

2006-09-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-09-01 20:13:14 +1000: Hey, I am running PostgreSQL 8.1.4 and I want to create a user from inside a function. Is this possible in 8.1? Ive found quite a few references on google using EXECUTE, but this seems relevant to earlier versions, not 8.1. I have a

Re: [GENERAL] Create user or role from inside a function?

2006-09-01 Thread Martijn van Oosterhout
On Fri, Sep 01, 2006 at 08:13:14PM +1000, Dan wrote: Hey, I am running PostgreSQL 8.1.4 and I want to create a user from inside a function. Is this possible in 8.1? Ive found quite a few references on google using EXECUTE, but this seems relevant to earlier versions, not 8.1. Does it

Re: [GENERAL] Create user or role from inside a function?

2006-09-01 Thread Karsten Hilbert
On Fri, Sep 01, 2006 at 08:13:14PM +1000, Dan wrote: I am running PostgreSQL 8.1.4 and I want to create a user from inside a function. Is this possible in 8.1? ... I have a function like this: ... Executing this function yields: # SELECT user_create('bob',1234,'bobspassword'); ERROR:

Re: [GENERAL] Create user or role from inside a function?

2006-09-01 Thread Andreas Kretschmer
Dan [EMAIL PROTECTED] schrieb: Hey, I am running PostgreSQL 8.1.4 and I want to create a user from inside a function. Is this possible in 8.1? Ive found quite a few references on google using EXECUTE, but this seems relevant to earlier versions, not 8.1. I have a function like this:

Re: [GENERAL] Create user or role from inside a function?

2006-09-01 Thread Dan
thanks! I actually came to a similar solution after Roman's post. Thanks all for the replies! Dan [EMAIL PROTECTED] schrieb: Hey, I am running PostgreSQL 8.1.4 and I want to create a user from inside a function. Is this possible in 8.1? Ive found quite a few references on google using

Re: [GENERAL] Create user or role from inside a function?

2006-09-01 Thread Dan
(Sending to the list as I accidently only replied to Roman with my earlier reply) Thanks for your assistance. This was a case of user error. To me the examples I looked at used the double quote () but on further inspection they do indeed use double single quotes ('). The quote_literal function

[GENERAL] Create User

2006-01-20 Thread DB Subscriptions
Hi, I have this table: CREATE TABLE users ( userid varchar(100) NOT NULL, nama varchar(50) NOT NULL, pword varchar(255) NOT NULL, groupe varchar(7) NOT NULL, rolle int2 NOT NULL DEFAULT 2, statux varchar(9) NOT NULL DEFAULT 'Active'::character varying, CONSTRAINT users_pkey PRIMARY KEY

Re: [GENERAL] Create User

2006-01-20 Thread Pandurangan R S
I hope this error arises when you do a insert. Can u post your insert statement that caused this error? On 1/20/06, DB Subscriptions [EMAIL PROTECTED] wrote: Hi, I have this table: CREATE TABLE users ( userid varchar(100) NOT NULL, nama varchar(50) NOT NULL, pword varchar(255) NOT

Re: [GENERAL] Create User

2006-01-20 Thread DB Subscriptions
Thanks Pandurangan. The Function could not even be saved or created. The error is not at the insert level but at the creation of the trigger function. Regards. Pandurangan R S wrote: I hope this error arises when you do a insert. Can u post your insert statement that caused this error?

Re: [GENERAL] Create User

2006-01-20 Thread Neil Conway
On Fri, 2006-01-20 at 09:16 +0100, DB Subscriptions wrote: BEGIN CREATE USER NEW.userid WITH PASSWORD NEW.pword IN GROUP NEW.groupe; RETURN new; END; You can't use PL/PgSQL variables in DDL commands. Try using EXECUTE: EXECUTE 'CREATE USER ' || NEW.userid || '...'; -Neil

[GENERAL] create user with database and contrib

2005-04-09 Thread Michal Hlavac
hello, is there some simple way, how to do this??? I need to create user 'diplo' with no database create and no add users privileges... createuser -A -D -P -E -U root diplo after that I create database 'diplo'; I need to import ltree into database 'diplo' with user diplo, but I can't add

Re: [GENERAL] create user with database and contrib

2005-04-09 Thread Oleg Bartunov
On Sat, 9 Apr 2005, Michal Hlavac wrote: hello, is there some simple way, how to do this??? I need to create user 'diplo' with no database create and no add users privileges... createuser -A -D -P -E -U root diplo after that I create database 'diplo'; I need to import ltree into database 'diplo'

Re: [GENERAL] create user with database and contrib

2005-04-09 Thread Michal Hlavac
Oleg Bartunov wrote: so, what's the problem ? psql diplo ltree.sql ok, I can add ltree via superuser, but I must grant access for user diplo to every function... it is possible to do that easier? ---(end of broadcast)--- TIP 7: don't forget to

Re: [GENERAL] create user with database and contrib

2005-04-09 Thread Oleg Bartunov
On Sat, 9 Apr 2005, Michal Hlavac wrote: Oleg Bartunov wrote: so, what's the problem ? psql diplo ltree.sql ok, I can add ltree via superuser, but I must grant access for user diplo to every function... it is possible to do that easier? Did you try what I recommend you ? It should works

Re: [GENERAL] create user with database and contrib

2005-04-09 Thread Bruno Wolff III
On Sat, Apr 09, 2005 at 15:19:58 +0200, Michal Hlavac [EMAIL PROTECTED] wrote: Oleg Bartunov wrote: so, what's the problem ? psql diplo ltree.sql ok, I can add ltree via superuser, but I must grant access for user diplo to every function... it is possible to do that easier? Functions

Re: [GENERAL] create user with database and contrib

2005-04-09 Thread Tom Lane
Oleg Bartunov oleg@sai.msu.su writes: On Sat, 9 Apr 2005, Michal Hlavac wrote: ok, I can add ltree via superuser, but I must grant access for user diplo to every function... Did you try what I recommend you ? It should works Dunno about ltree, but I have found that the default installation

[GENERAL] CREATE USER vs. createuser

2001-09-05 Thread Mihai Gheorghiu
With createuser I managed to create users like 12345 and John Doe (with a space). It did not work with CREATE USER. Aren't they supposed to do the same? Thank you all, Mihai Gheorghiu ---(end of broadcast)--- TIP 1: subscribe and unsubscribe

[GENERAL] create user

2001-03-26 Thread Marcos
hi, i have just created a new database. I would like to add, now, a new user. The user can make any changes in THIS database (no one else). i used: (from NEW database) create user new_user with password "new_pass"; i try to connect to another database with this new_user and i

Re: [GENERAL] create user, user exists

2001-03-17 Thread Richard Huxton
From: "Ron Peterson" [EMAIL PROTECTED] I'm having a bit of authentication trouble. I'm trying to use 'crypt' authentication. PostgreSQL 7.1beta5. My pg_hba.conf is as follows: #local all trust local all crypt passtest When I do 'local all trust', everything works fine. When I invert

Re: [GENERAL] create user, user exists

2001-03-17 Thread Ron Peterson
Tom Lane wrote: Ron Peterson [EMAIL PROTECTED] writes: I'm having a bit of authentication trouble. I'm trying to use 'crypt' authentication. PostgreSQL 7.1beta5. My pg_hba.conf is as follows: IIRC, you can't use crypt with a flat password file, you have to use plain passwd

Re: [GENERAL] create user, user exists

2001-03-17 Thread Peter Eisentraut
Ron Peterson writes: So now I'm trying to decide whether I want to use 'password' or pg_shadow for user authentication. Using 'password' seems like a broad (and easily managed) brush, while using groups would give me a finer degree of control over permission settings. The ability to use

Re: [GENERAL] CREATE USER in RULE or TRIGGER

2000-10-24 Thread Tom Lane
Marcin Mazurek [EMAIL PROTECTED] writes: is it possible to CREATE USER in a RILE or TRIGGER? Not with a rule, and not with a plpgsql trigger either (although I think the latter restriction is fixed in current sources). You could make it work with a pltcl trigger, I believe.

[GENERAL] CREATE USER and ODBC

2000-09-16 Thread Jarmo Paavilainen
Hi, Sorry if this has allready been sent, but Ive not received it from the list. I seem not to able to create a user through ODBC (through MFC classes). What I use is "CDatabase::ExecuteSQL( "CREATE USER jarmo WITH PASSWORD 'myPass'" );" PostgreSQL complains that it can not create users

Re: [GENERAL] CREATE USER and ODBC

2000-09-16 Thread Tom Lane
PS. Ive followed this list for a while and... Is PostgreSQL more buggy and harder to port to than mySQL, or is it just that Im not subscribed to mySQL problem lists. DS. I'm not subscribed to mySQL's lists either, so I won't venture a comparison. But reading a mailing list just naturally

RE: [GENERAL] CREATE USER

2000-06-01 Thread Hiroshi Inoue
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Thomas Lockhart I have to create users via an ODBC connection, but I get this error: CREATE USER: may not be called in a transaction block With psql I have no problems. Any body knows what is

Re: [GENERAL] CREATE USER

2000-06-01 Thread Tom Lane
"Hiroshi Inoue" [EMAIL PROTECTED] writes: How about starting new transaction automatically after committing "create user ..." at backend side if "create user" is the first command of the transaction ? So then begin; create user ...; rollback; would do the wrong thing