help me plz with 2 postgres users

Started by spol@mail.ruabout 18 years ago3 messagesbugs
Jump to latest
#1spol@mail.ru
spol@mail.ru

Hello?
help me plz? i don't khow what to do...

How can I delete first postgres user.

template1=# select usename,passwd,valuntil,ctid,xmin,xmax,cmin,cmax from
pg_shadow where usesysid=1;
usename | passwd | valuntil | ctid | xmin
| xmax | cmin | cmax
----------+-------------------------------------+----------+-------+------+----------+----------+------

postgres | | | (0,1) | 1
| 16754522 | 16754522 | 0
postgres | md65476547442532.. | infinity | (0,2) | 2 | 0
| 0 | 0
(2 rows)

thx for your help.
Oleg

In reply to: spol@mail.ru (#1)
Re: help me plz with 2 postgres users

spol@mail.ru wrote:

How can I delete first postgres user.

Ugh. How did you duplicate if there is an unique index in rolname ?
pg_shadow is a view; you want to take a look at the real relation
pg_authid.

delete from pg_authid where ctid = '(0,1)'

--
Euler Taveira de Oliveira
http://www.timbira.com/

#3Rodriguez Fernando
rodriguez@ort.edu.uy
In reply to: spol@mail.ru (#1)
Re: help me plz with 2 postgres users

spol@mail.ru wrote:

Hello?
help me plz? i don't khow what to do...

How can I delete first postgres user.

template1=# select usename,passwd,valuntil,ctid,xmin,xmax,cmin,cmax
from pg_shadow where usesysid=1;
usename | passwd | valuntil | ctid |
xmin | xmax | cmin | cmax
----------+-------------------------------------+----------+-------+------+----------+----------+------

postgres | | | (0,1) |
1 | 16754522 | 16754522 | 0
postgres | md65476547442532.. | infinity | (0,2) | 2 |
0 | 0 | 0
(2 rows)

thx for your help.
Oleg

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Hola, no se me ocurre como ayudarte pero podrias hace asi la consulta:
select usename||'-',passwd,valuntil,ctid,xmin,xmax,cmin,cmax from
pg_shadow where usesysid=1;

Que version de postgres estas usando?