in reply to Re: Cleaning Up Apache::Session data
in thread Cleaning Up Apache::Session data

The orginal poster is using PostgreSQL. I don't use PostgreSQL much, but I did a quick scan over thier docs. PostgreSQL doesn't appear to have the same autmatic TIMESTAMP updates that MySQL has. Someone more familer with PostgreSQL will have to verify this for me, though.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

  • Comment on Re: Re: Cleaning Up Apache::Session data

Replies are listed 'Best First'.
Re: Re: Re: Cleaning Up Apache::Session data
by pfaut (Priest) on Mar 31, 2003 at 16:11 UTC

    PostgreSQL has triggers. You can implement the same functionality with a simple BEFORE UPDATE/INSERT trigger.

    90% of every Perl application is already written.
    dragonchild
Re: Re: Re: Cleaning Up Apache::Session data
by dga (Hermit) on Mar 31, 2003 at 17:06 UTC

    PostgreSQL allows setting of a default value for a column, triggers are not needed for this task. See my reply to another node in this thread at Re: Re: Cleaning Up Apache::Session data.

    Update: Triggers are what's desired here since he wants to update the rows ald set the time also.