[postgresforest-users 30] Re: バッチ更新のサポートについて

アーカイブの一覧に戻る

Satoshi Nagayasu nagay****@nttda*****
2007年 4月 6日 (金) 10:19:16 JST


永安です。

補足ですが、sourceforgeのバグトラッキングの方にfix方法を記述し、
クローズとしました。

http://sourceforge.jp/tracker/index.php?func=detail&aid=10240&group_id=2580&atid=9579

他にもいくつかクローズしましたので、よろしければご参照ください。

で、これらの修正点を取り込んだ4.0.2については、
今月中旬か下旬くらいに出せればと思っています。
よろしくお願いします。

ではでは。

Satoshi.Nagatsuma wrote:
> 長妻と申します。
> 
> executeBatchの件ですが、Forest4.0.1にて実際に確認してみたところ
> 確かにおっしゃるとおりの結果となりました。
> ご報告ありがとうございます。
> 
> コードを確認してみたところ、暫定的な対処であれば
> それほど大きな変更無く実現可能なようですので、
> 次回のマイナーバージョンアップの段階で含める予定です。
> 
> 
> 以上、よろしくお願いいたします。
> 
> 
> Akio KUDOH wrote:
>> 度々すみません。工藤と申します。
>>
>> DatabaseMetadata#supportsBatchUpdates()の結果はtrueとなりますが、
>> バッチ更新はサポートされていませんでしょうか。
>>
>> JavaプログラムからPostgresForestへバッチ更新を行うと、
>> INSERT/UPDATE/DELETEが完了しないようです。
>> Statement#executeBatch()の返却結果である更新件数が、全てゼロと
>> なり、DBにも更新結果が反映されません。
>>
>> 以下、再現ソースとなります。
>> import java.sql.*;
>> public class BatchSql {
>>   public static void main(String[] args) throws Exception {
>>     Class.forName("org.postgresforest.Driver");
>>     Connection conn = DriverManager.getConnection(
>>     "jdbc:postgresforest:GSC=//sv1:5432/gsc @ sample","user","pass");
>>     conn.setAutoCommit(false);
>>     Statement stmt = conn.createStatement();
>>     // テーブル仕様: create table a(b varchar);
>>     stmt.addBatch("INSERT INTO a (b) VALUES ('foo')");
>>     stmt.addBatch("INSERT INTO a (b) VALUES ('bar')");
>>     int[] cnt = stmt.executeBatch();
>>     for (int i = 0; i < cnt.length; i++) {
>>       // Postgres直接接続だと1が、PostgresForestだと0が返る
>>       System.out.println(cnt[i]);
>>     }
>>     conn.commit();
>>     stmt.close();
>>     conn.close();
>>   }
>> }
>>
>> PostgresForestはバージョン4.0.1を使用しております。
>> よろしくお願いいたします。
>>
>> _______________________________________________
>> postgresforest-users mailing list
>> postg****@lists*****
>> http://lists.sourceforge.jp/mailman/listinfo/postgresforest-users
>>
> 
> _______________________________________________
> postgresforest-users mailing list
> postg****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/postgresforest-users


-- 
NAGAYASU Satoshi <nagay****@nttda*****>
Phone: +81-50-5546-2496




postgresforest-users メーリングリストの案内
アーカイブの一覧に戻る