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

Re: [HACKERS] update_pg_pwd trigger does not work very well

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <wieck(at)debis(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] update_pg_pwd trigger does not work very well
Date: 2000-02-28 08:02:22
Message-ID: 21354.951724942@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
wieck(at)debis(dot)com (Jan Wieck) writes:
>>>> itself do nothing except set a flag variable.  The flag is examined
>>>> somewhere in xact.c after successful completion of a transaction,
>>>> and if it's set then we run a new transaction cycle in which we
>>>> read pg_shadow and write pg_pwd.
>> 
>> If you think that this is okay (and not just a hack), then go for it.

>     I consider it a hack, since this particular trigger  needs  a
>     global flag known explicitly by xact routines. I like general
>     solutions instead.

Well, really it's pg_pwd itself that is a hack --- we wouldn't need
to be worrying about all this if pg_pwd didn't exist outside the
database/transaction universe.  But I don't think it'd be wise to
try to bring the postmaster into that universe, so we're stuck with
a hack for exporting user authorization info.

If we had examples of other problems that could be solved by such
a mechanism, then I'd agree with Jan that we ought to invent a general
after-commit-do mechanism.  But I don't recall users clamoring for it,
so I question whether the extra effort is worthwhile.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Jan WieckDate: 2000-02-28 08:13:38
Subject: Re: [HACKERS] update_pg_pwd trigger does not work very well
Previous:From: Zeugswetter Andreas SBDate: 2000-02-28 08:01:58
Subject: AW: AW: AW: [HACKERS] TRANSACTIONS

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