Re: Removing all users from a group

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: David Sankel <camior(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Removing all users from a group
Date: 2005-08-31 18:39:34
Message-ID: 20050831183934.GC14167@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 31, 2005 at 12:30:14 +0200,
David Sankel <camior(at)gmail(dot)com> wrote:
>
> DELETE FROM pg_user
> WHERE usesysid = ANY ( SELECT grolist
> FROM pg_group
> WHERE groname = 'somegroupname' )
>
> But, alas, it doesn't. Neither does any combination of IN and ANY. It seems
> to me like this should work since the same syntax works if we weren't
> talking about arrays.

In 8.1 you will be able to replace the second FROM with USING to do a join
in a DELETE. Currently you need to take advantage of the missing from
feature.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Frank 2005-08-31 18:50:16 Re: newbie - postgresql or mysql
Previous Message Bruno Wolff III 2005-08-31 18:31:29 Re: optimum settings for dedicated box