Question about commit

From: Lee <Lee(at)JamToday(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Question about commit
Date: 2010-02-10 20:35:37
Message-ID: 4B731899.8010105@JamToday.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Lets say I have the following:

1. A table called LOGDATA

2. A stored procedure logem( owner, calling_point, message) that
inserts its arguments (assumed varchar2() )
and maybe some extra data such as the date and time, into corresponding
columns in the table LOGDATA and then commits.

3. Now for the hard part.

I want to call logem() [something like ... logem( 'test01',
'main_loop', 'passing checkpoint charlie' ); ]
without having the commit which is coded in logem() causing a commit
action in the routine that invokes logem(), NOR
do I want a rollback in the calling routine to wipe out (roll back)
any historical trace information that I've already written to LOGDATA

If postgreSQL had such a thing as an "automomous transaction" as in
Oracle or mySql, then there would be problem; but AFAIK
(but then again, I don't know much) it doesn't, so how do people
get the same effect?

Surely I'm not the only one who would like to do this sort of thing

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Mike 2010-02-10 23:46:17 COPY from
Previous Message Tom Lane 2010-02-10 18:03:47 Re: Full text search