Re: Need A Suggestion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: Lane Van Ingen <lvaningen(at)esncc(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Need A Suggestion
Date: 2005-10-10 20:32:19
Message-ID: 5594.1128976339@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jonah H. Harris" <jonah(dot)harris(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-10-10 21:23:27 Re: slower merge join on sorted data chosen over nested loop
Previous Message David Fetter 2005-10-10 20:22:39 Re: Need A Suggestion