Skip site navigation (1) Skip section navigation (2)

Re: help me please

From: "Josh Tolley" <eggyknap(at)gmail(dot)com>
To: "spol(at)mail(dot)ru" <spol(at)mail(dot)ru>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: help me please
Date: 2007-12-28 15:09:35
Message-ID: e7e0a2570712280709p672a9fb2y651c88bc51f3ce@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On Dec 28, 2007 7:01 AM, spol(at)mail(dot)ru <spol(at)mail(dot)ru> wrote:
> hello
>
> Help me please...
> I have two "postgres" user. How to delete the first one ???
>
> *******************
> # select * from pg_shadow where usesysid=1;
>  usename  | usesysid | usecreatedb | usesuper | usecatupd
> |               passwd                | valuntil | useconfig
> ----------+----------+-------------+----------+-----------+-------------------------------------+----------+-----------
>  postgres |        1 | t           | t        | t
> |                                     |          |
>  postgres |        1 | t           | t        | t         |
> md53532747417351142d5270721fcf740ed5 | infinity |
> (2 rows)
> *******************
>
> *******************
> # select * from pg_user where usesysid=1;
>  usename  | usesysid | usecreatedb | usesuper | usecatupd |  passwd  |
> valuntil | useconfig
> ----------+----------+-------------+----------+-----------+----------+----------+-----------
>  postgres |        1 | t           | t        | t         | ********
> |          |
>  postgres |        1 | t           | t        | t         | ******** |
> infinity |
> (2 rows)
> *******************
>
>
> I tried
>     delete from pg_shadow where passwd is null;
>
> but it's not working.
>
> Help me please
> oleg

pg_shadow is a view based on pg_authid. Try deleting it from
pg_authid. Note that pg_authid is defined with OIDs, which might also
be useful for you.

- Josh / eggyknap

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-12-28 15:11:47
Subject: Re: help me please
Previous:From: spol@mail.ruDate: 2007-12-28 14:01:47
Subject: help me please

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group