From: | <btober(at)seaworthysys(dot)com> |
---|---|
To: | <netadmin(at)vcsn(dot)com> |
Cc: | <btober(at)seaworthysys(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: on connect trigger? |
Date: | 2003-11-07 08:49:56 |
Message-ID: | 64443.66.212.203.144.1068194996.squirrel@$HOSTNAME |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Quoting btober(at)seaworthysys(dot)com:
>
>> Is there any kind of mechanism in pg 7.3 for doing something like
>> what I would describe as a "login trigger" procedure to run
>> when a user connects to the database?
>>
>
> Berend,
>
> I've got something like that setup on an e-communities site I built.
> There was already a "last action" query/report I had so what I have
> setup on as part of the database nightly vacuum is to first delete any
> account that did not have any actions for over a year. You don't need
> to do a trigger to do that. You just need to make a cron job that run
> at whatever is an acceptable interval.
>
> --
> Keith C. Perry, MS E.E.
That sounds somewhat interesting, and I understand the crontab approach,
but the key to your methods is that "last action" thing. I can see how I
might get a date from some table that has an column value that gets
assigned the current date after insert or update (using DEFAULT or a
trigger), but what if the user's access is read-only, i.e., they perform
only SELECT operations? How could I catch that?
~Berend Tober
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Ganainm | 2003-11-07 11:39:14 | Database of electoral results? |
Previous Message | Bruce Momjian | 2003-11-07 04:02:01 | Re: Cartesian product bug? |