Re: Using TEMP ON COMMIT DROP, but need logging too. - Mailing list pgsql-sql

From Benjamin Dietrich
Subject Re: Using TEMP ON COMMIT DROP, but need logging too.
Date
Msg-id E00CB993-4D2D-4063-A55E-E5EE4E0A04D7@uni-tuebingen.de
Whole thread Raw
In response to Using TEMP ON COMMIT DROP, but need logging too.  (Michael Moore <michaeljmoore@gmail.com>)
List pgsql-sql
> On 13 Oct 2016, at 23:24, Michael Moore <michaeljmoore@gmail.com> wrote:
> ...
> In otherwords:
>
> insert into my_logging_table values (...);
> commit;
>
> Obviously I can't do the commit without dropping my temp tables.
>
> What is a good way to implement my intended functionality?

If you are looking for something like "autonomous transactions” in Oracle’s pl/sql, using the new extension
‘pg_background’might help: 
http://blog.dalibo.com/2016/08/19/Autonoumous_transactions_support_in_PostgreSQL.html

Let me also know, if you find a more elegant way.

Cheers
Benjamin



pgsql-sql by date:

Previous
From: Ranjeet Verma
Date:
Subject: Table Partitioning with Foreign Data Wrapper
Next
From: Michael Moore
Date:
Subject: Re: Using TEMP ON COMMIT DROP, but need logging too.