Unix Technical Forum

help me please

This is a discussion on help me please within the pgsql Bugs forums, part of the PostgreSQL category; --> hello Help me please... I have two "postgres" user. How to delete the first one ??? ******************* # select ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 11:13 AM
spol@mail.ru
 
Posts: n/a
Default help me please

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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 11:13 AM
Josh Tolley
 
Posts: n/a
Default Re: help me please

On Dec 28, 2007 7:01 AM, spol@mail.ru <spol@mail.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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 11:13 AM
Tom Lane
 
Posts: n/a
Default Re: help me please

"spol@mail.ru" <spol@mail.ru> writes:
> I have two "postgres" user. How to delete the first one ???


Let's see the system columns (ctid,xmin,xmax,cmin,cmax) for those
two rows?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 11:13 AM
Tom Lane
 
Posts: n/a
Default Re: help me please

"Josh Tolley" <eggyknap@gmail.com> writes:
> pg_shadow is a view based on pg_authid.


Not in 7.4 it wasn't ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-24-2008, 06:12 PM
spol@mail.ru
 
Posts: n/a
Default help me please

Hello, help me please,
I don't know how, but i got 2 postgres users.
How can I delete the first one ????
thx alot for your answers.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
select passwd,ctid,xmin,xmax,cmin,cmax from pg_shadow where usesysid =1;
passwd | ctid | xmin | xmax |
cmin | cmax
-------------------------------------+-------+------+----------+----------+-----
-
| (0,1) | 1 | 16754522 |
16754522 | 0
md510db8c04d26d32185270721fcf32155 | (0,2) | 2 | 0 | 0
| 0
(2 rows)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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 |
md510db8c04d231142d5
270721fcf740ed5 | infinity |
(2 rows)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Tom Lane пишет:
> "spol@mail.ru" <spol@mail.ru> writes:
>
>> I have two "postgres" user. How to delete the first one ???
>>

>
> Let's see the system columns (ctid,xmin,xmax,cmin,cmax) for those
> two rows?
>
> regards, tom lane
>
>
>



--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:52 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com