Re: [GENERAL] drop user / role if exists

2006-05-21 Thread P.M
first of all, it's not -i as i wrote but \ii work under windows OS.and my script is working now.thanks for your helpMartijn van Oosterhout wrote: On Sun, May 21, 2006 at 02:59:25AM -0700, P.M wrote:> To run the script i use :> > under psql command line, i load my SQL script file via :> > psql -i m

Re: [GENERAL] drop user / role if exists

2006-05-21 Thread Devrim GUNDUZ
Hi, On Sun, 2006-05-21 at 02:25 -0700, P.M wrote: > And when i run the SQL script, PostgreSQL stops just on first > errorso if user does not exist, my script is not any longer > run :-( I think you are running your query inside a transaction. Remove the BEGIN and COMMIT parts... -- The Pos

Re: [GENERAL] drop user / role if exists

2006-05-21 Thread Martijn van Oosterhout
On Sun, May 21, 2006 at 02:59:25AM -0700, P.M wrote: > To run the script i use : > > under psql command line, i load my SQL script file via : > > psql -i myfile; Don't know what -i does, it's not a supported option, perhaps you mean -f? In any case, my version of postgres 7.4.7 works fine: $ c

Re: [GENERAL] drop user / role if exists

2006-05-21 Thread P.M
To run the script i use :under psql command line, i load my SQL script file via :psql -i myfile;Martijn van Oosterhout wrote: On Sun, May 21, 2006 at 02:25:44AM -0700, P.M wrote:> Thanks Martijn, but i'm currently working on the SQL script to create the full database. Not on some stored procedure.

Re: [GENERAL] drop user / role if exists

2006-05-21 Thread Martijn van Oosterhout
On Sun, May 21, 2006 at 02:25:44AM -0700, P.M wrote: > Thanks Martijn, but i'm currently working on the SQL script to create the > full database. Not on some stored procedure. > > And when i run the SQL script, PostgreSQL stops just on first > errorso if user does not exist, my script is not

Re: [GENERAL] drop user / role if exists

2006-05-21 Thread P.M
Thanks Martijn, but i'm currently working on the SQL script to create the full database. Not on some stored procedure.And when i run the SQL script, PostgreSQL stops just on first errorso if user does not exist, my script is not any longer run :-(do you have any idea how to pass over this issue

Re: [GENERAL] drop user / role if exists

2006-05-21 Thread Martijn van Oosterhout
On Sun, May 21, 2006 at 02:08:38AM -0700, P.M wrote: > Hi, > > How under postgreSQL 7 do the equivalent as DROP USER / ROLE IF EXISTS ? > my web provider only support postgreSQL 7 :-( Do the DROP USER and ignore the error if it doesn't exist. -- Martijn van Oosterhout http://svana.org/klep

[GENERAL] drop user / role if exists

2006-05-21 Thread P.M
Hi,How under postgreSQL 7 do the equivalent as DROP USER / ROLE  IF EXISTS ?my web provider only support postgreSQL 7 :-(thanks a lot,Maileen Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.