Search Postgresql Archives

Re: [PL/pgSQL] Commit every N rows. Is it possible ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeremiasz Miedzinski wrote:
I'm digging into postgresql documentation but maybe I'm just not smart
enough to understand the way which transactions are being processed into
pgSQL. Is it possible to port above code to PL/pgSQL ?

All functions, including pl/pgsql functions take place within a transaction. You cannot commit, but you can catch errors and roll back to savepoints within a transaction.

If you want to have multiple transactions you will need to step outside of the database.

It's not clear to me why your function does what it does anyway. I can't see why you wouldn't just do this as standard queries.

--
  Richard Huxton
  Archonet Ltd


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux