Re: Storing original rows before update or delete

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Miroslav Šimulčík <simulcik(dot)miro(at)gmail(dot)com>
Cc: mabewlun(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Storing original rows before update or delete
Date: 2011-11-04 13:27:47
Message-ID: CA+TgmoZxJm8Q6PK-BkwoA4K2u=49u=a9TJT=QczLc5Lh4moNjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/11/4 Miroslav Šimulčík <simulcik(dot)miro(at)gmail(dot)com>:
> If I restrict any DML operation to internal tables (history tables) in phase
> of parse analyze, nobody can do such operation regardless of user rights.

There is absolutely zero point in trying to prevent the superuser from
doing whatever they want. The superuser has many, many ways of
bypassing whatever controls you put in place - e.g. loading custom C
code into the backend, whacking around the system catalogs, etc.

> However, triggers can't be used in this case.

Which is another reason not to do it that way.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-11-04 13:34:05 Show statistics target in \d+
Previous Message Robert Haas 2011-11-04 13:24:48 Re: DeArchiver process