Re: [HACKERS] Need A Suggestion

2005-10-12 Thread Alfranio Correia Junior
You can find something to run triggers on commit at http://gorda.di.uminho.pt/community/pgsqlhooks/ It also allows to define triggers on begin, startup and shutdown. It works fine with triggers written in C. A patch will be available soon in order to allow to writte triggers in other languages

Re: [HACKERS] Need A Suggestion

2005-10-11 Thread Ilia Kantor
> Is there a simple, user-accessible mechanism to schedule a function to > be run at query commit ? CONSTRAINT TRIGGER (DEFERRABLE) It is kinda hack, because CONSTRAINT TRIGGERs are not indended for such use, But there are no other "ON COMMIT" triggers in postgresql. -

Re: [HACKERS] Need A Suggestion

2005-10-11 Thread Hannu Krosing
On E, 2005-10-10 at 16:32 -0400, Tom Lane wrote: > "Jonah H. Harris" <[EMAIL PROTECTED]> 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

MySQL XA (Was Re: [HACKERS] Need A Suggestion)

2005-10-10 Thread Christopher Kings-Lynne
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 t

Re: [HACKERS] Need A Suggestion

2005-10-10 Thread Christopher Kings-Lynne
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 t

Re: [HACKERS] Need A Suggestion

2005-10-10 Thread Neil Conway
On Mon, 2005-10-10 at 15:57 -0400, Lane Van Ingen wrote: > That sounds good, and about what I expected. I am not a C programmer, but > have access to others who are. Where would I need to put the C function > in order to have PostgreSQL find it? Any special considerations > other than putting it in

Re: [HACKERS] Need A Suggestion

2005-10-10 Thread Tom Lane
"Jonah H. Harris" <[EMAIL PROTECTED]> 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 peo

Re: [HACKERS] Need A Suggestion

2005-10-10 Thread David Fetter
On Mon, Oct 10, 2005 at 03:40:43PM -0400, Lane Van Ingen wrote: > I am working on the development of a military application which uses > PostgreSQL trigger functions. I cannot (unfortunately) tell you > specify use, being as it is classified. > > What I need the ability to occasionally call (execu

Re: [HACKERS] Need A Suggestion

2005-10-10 Thread Andrew Dunstan
[mailto:[EMAIL PROTECTED] Sent: Monday, October 10, 2005 3:49 PM To: Lane Van Ingen Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Need A Suggestion In the past, I've just written a C-based function that calls out to system. 2005/10/10, Lane Van Ingen <[EMAIL PROTECTED]>

Re: [HACKERS] Need A Suggestion

2005-10-10 Thread Dann Corbit
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-hackers- > [EMAIL PROTECTED] On Behalf Of Lane Van Ingen > Sent: Monday, October 10, 2005 12:41 PM > To: pgsql-hackers@postgresql.org > Subject: [HACKERS] Need A Suggestion > > I am working on the d

Re: [HACKERS] Need A Suggestion

2005-10-10 Thread Lane Van Ingen
rom: Jonah H. Harris [mailto:[EMAIL PROTECTED] Sent: Monday, October 10, 2005 3:49 PM To: Lane Van Ingen Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Need A Suggestion In the past, I've just written a C-based function that calls out to system. 2005/10/10, Lane Van Ingen <[EMAI

Re: [HACKERS] Need A Suggestion

2005-10-10 Thread Jonah H. Harris
In the past, I've just written a C-based function that calls out to system. 2005/10/10, Lane Van Ingen <[EMAIL PROTECTED]>: > I am working on the development of a military application which uses > PostgreSQL trigger functions. I cannot (unfortunately) tell you specify use, > being as it is classi

[HACKERS] Need A Suggestion

2005-10-10 Thread Lane Van Ingen
I am working on the development of a military application which uses PostgreSQL trigger functions. I cannot (unfortunately) tell you specify use, being as it is classified. What I need the ability to occasionally call (execute) a .exe program object outside of the database from within the function