Transaction question

Started by Nonamealmost 22 years ago3 messages
#1Noname
kkim3@ncsu.edu

Hello,

I'm trying to insert new row in a system catalog table and then I'd like
to retrieve this value in one command internally. I started new
transaction for insertion operation and commited that transaction. And
insert operation works well, but I give me server crash error. Could you
let me know how can I handle transactions for insertion and selection
sequentially in one command?

#2Alvaro Herrera
alvherre@dcc.uchile.cl
In reply to: Noname (#1)
Re: Transaction question

On Tue, Mar 30, 2004 at 12:58:31PM -0500, kkim3@ncsu.edu wrote:

I'm trying to insert new row in a system catalog table and then I'd like
to retrieve this value in one command internally. I started new
transaction for insertion operation and commited that transaction. And
insert operation works well, but I give me server crash error. Could you
let me know how can I handle transactions for insertion and selection
sequentially in one command?

I think rather than starting and committing a new transaction, what you
want to do is CommandCounterIncrement() after inserting without messing
the transaction mechanism.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"The eagle never lost so much time, as
when he submitted to learn of the crow." (William Blake)

#3Noname
kkim3@ncsu.edu
In reply to: Alvaro Herrera (#2)
Re: Transaction question

Thank you. At the first time, it works well. But if I try to do same
command again, it still give me a server crash error.

Show quoted text

On Tue, Mar 30, 2004 at 12:58:31PM -0500, kkim3@ncsu.edu wrote:

I'm trying to insert new row in a system catalog table and then I'd like
to retrieve this value in one command internally. I started new
transaction for insertion operation and commited that transaction. And
insert operation works well, but I give me server crash error. Could you
let me know how can I handle transactions for insertion and selection
sequentially in one command?

I think rather than starting and committing a new transaction, what you
want to do is CommandCounterIncrement() after inserting without messing
the transaction mechanism.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"The eagle never lost so much time, as
when he submitted to learn of the crow." (William Blake)