Re: Need A Suggestion - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Need A Suggestion
Date
Msg-id 1129025666.4851.1.camel@fuji.krosing.net
Whole thread Raw
In response to Re: Need A Suggestion  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Need A Suggestion
List pgsql-hackers
On E, 2005-10-10 at 16:32 -0400, Tom Lane wrote:
> "Jonah H. Harris" <jonah.harris@gmail.com> writes:
> > In the past, I've just written a C-based function that calls out to system.
> 
> Use pltclu, plpythonu, or plperlu, according to taste.  They all have
> pre-existing solutions for this.
> 
> Whether this is a good idea is another question entirely.  Lots of
> people will tell you it's a horrid idea for PG functions to cause
> outside-the-database side effects.  The reason is that if the
> transaction that called the function aborts later, there is no way
> to roll back what was done outside the database, and so the state
> outside the database will no longer be in sync with the state inside.

Is there a simple, user-accessible mechanism to schedule a function to
be run at query commit ?

-- 
Hannu Krosing <hannu@skype.net>



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: slower merge join on sorted data chosen over
Next
From: Martijn van Oosterhout
Date:
Subject: Scan Direction not part of ScanState?