Re: Preventing DELETEs

From: "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>
To: Dmitry Tkach <dmitry(at)openratings(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Preventing DELETEs
Date: 2002-09-26 19:50:40
Message-ID: 200209270120.40845.mallah@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi Dmitry,

Got it working....
i made a small change.

On Friday 27 September 2002 00:47, you wrote:
> I think this should work:
>
> alter table mytable owner to postgres;
> grant all on my table to public;

instead of
> revoke delete on my table from public;

i did :
revoke delete on my table from tradein (which is me) ;

tradein_clients=> BEGIN WORK; delete from users where userid=34866;
BEGIN
ERROR: users: Permission denied.
tradein_clients=> ROLLBACK ;
ROLLBACK
tradein_clients=> UPDATE users set password='mallah' where userid=34866;
UPDATE 1
tradein_clients=>

does public not include me??

regds
mallah.

>
> I hope, it helps...
>
> Dima
>
> Rajesh Kumar Mallah. wrote:
> > Hi ,
> >
> > I have a created a database and a table in it,
> >
> > I want to prevent "DELETES" on the table in this
> > database by everyone except superuser postgres.
> > even by me (the creator of this database and table)
> >
> >
> > I have tried in many ways (ALTER TABLE REVOKE DELETE .. etc etc)
> >
> > but i always end up with having the permission
> >
> >
> > can any one tell me how the prevention can be accomplished?
> >
> > thanks in advance.
> >
> > regds
> > mallah.
> >
> >
> >
> > --=20
> > Rajesh Kumar Mallah,
> > Project Manager (Development)
> > Infocom Network Limited, New Delhi
> > phone: +91(11)6152172 (221) (L) ,9811255597 (M)
> >
> > Visit http://www.trade-india.com ,
> > India's Leading B2B eMarketplace.
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dan Langille 2002-09-26 20:57:26 Re: Case Sensitive "WHERE" Clauses?
Previous Message Rajesh Kumar Mallah. 2002-09-26 19:23:20 Re: Preventing DELETEs