Re: drop user / role if exists

From: Devrim GUNDUZ <devrim(at)commandprompt(dot)com>
To: "P(dot)M" <pmdanger(at)yahoo(dot)com>
Cc: "PostgreSQL General (EN)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: drop user / role if exists
Date: 2006-05-21 10:17:09
Message-ID: 1148206629.3177.0.camel@laptop.gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
> error....so 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 PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message P.M 2006-05-21 10:31:10 Re: drop user / role if exists
Previous Message Martijn van Oosterhout 2006-05-21 10:13:11 Re: drop user / role if exists