Re: Using TEMP ON COMMIT DROP, but need logging too.

From: Benjamin Dietrich <b(dot)dietrich(at)uni-tuebingen(dot)de>
To: Michael Moore <michaeljmoore(at)gmail(dot)com>
Cc: postgres list <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Using TEMP ON COMMIT DROP, but need logging too.
Date: 2016-10-14 07:24:17
Message-ID: E00CB993-4D2D-4063-A55E-E5EE4E0A04D7@uni-tuebingen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


> On 13 Oct 2016, at 23:24, Michael Moore <michaeljmoore(at)gmail(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Moore 2016-10-14 17:23:38 Re: Using TEMP ON COMMIT DROP, but need logging too.
Previous Message Michael Moore 2016-10-13 21:53:53 Re: Using TEMP ON COMMIT DROP, but need logging too.