Re: [GENERAL] SPI-functions and transaction control

2008-02-20 Thread Mikko Partio
On Feb 19, 2008 12:12 AM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Mikko Partio escribió: > > > Now, I was wondering if a c function would be faster, and with the help > of > > the manual I have written a function that can insert tuples from one > table > > to another. As the manual states ( >

Re: [GENERAL] SPI-functions and transaction control

2008-02-18 Thread Alvaro Herrera
Mikko Partio escribió: > Now, I was wondering if a c function would be faster, and with the help of > the manual I have written a function that can insert tuples from one table > to another. As the manual states ( > http://www.postgresql.org/docs/8.3/interactive/spi.html), there is no way to > cat

[GENERAL] SPI-functions and transaction control

2008-02-17 Thread Mikko Partio
Hello list I am trying to write a function in c that would 'merge' two tables together. The idea is that we insert rows from one table to another, and if there is a constraint violation, update the old row with the new row. I have done this succesfully with plpgsql, but alas, the tables are so b