RE: Large Objects

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема RE: Large Objects
Дата
Msg-id 02cd01c1186e$586dbae0$8201a8c0@inspiron
обсуждение исходный текст
Ответ на Re: Large Objects  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
Yes, you have to commit the transaction at the end

Con.commit(), or con.rollback() I think.

Dave
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Tom Lane
Sent: July 29, 2001 4:20 PM
To: daniel.fisher@vt.edu
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] Large Objects


Daniel Fisher <dfisher@vt.edu> writes:
> I'm having some trouble inserting a large object into the database.
> I'm fairly certain that the problem is in my java code because I wrote

> some quick PHP code and it worked fine. The main problem is I'm not
> getting any errors, so I'm kinda stumped. The code appears to run
> fine, but nothing is being inserted into the database.

The query trace shows that you are starting a transaction (with BEGIN)
and never committing it (no COMMIT or END).  So when you close the
connection, the transaction is rolled back, and its effects go away.

I suppose that having done "conn.setAutoCommit(false)", you need to add
a command to explicitly commit the transaction, but I don't know JDBC
well enough to know how you do that...

            regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Large Objects
Следующее
От: Kovács Péter
Дата:
Сообщение: RE: Large Objects