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

From David G. Johnston
Subject Re: Using TEMP ON COMMIT DROP, but need logging too.
Date
Msg-id CAKFQuwa8CaaPecOJXPWkroUK6G-GnpMF8LDLfXMzq9Sv88vegQ@mail.gmail.com
Whole thread Raw
In response to Using TEMP ON COMMIT DROP, but need logging too.  (Michael Moore <michaeljmoore@gmail.com>)
Responses Re: Using TEMP ON COMMIT DROP, but need logging too.  (Michael Moore <michaeljmoore@gmail.com>)
List pgsql-sql
On Thu, Oct 13, 2016 at 2:24 PM, Michael Moore <michaeljmoore@gmail.com> wrote:
I've written a function that uses several temporary tables with the ON COMMIT DROP option. This function does no updates to the database. Now I would like to put in some logging. 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?


​You can't put "commit" inside a function so I feel like you are failing to share some important details by not providing code.

David J.
 

pgsql-sql by date:

Previous
From: Michael Moore
Date:
Subject: Using TEMP ON COMMIT DROP, but need logging too.
Next
From: Michael Moore
Date:
Subject: Re: Using TEMP ON COMMIT DROP, but need logging too.