From: goto@... Date: 1999-07-27T15:37:51+09:00 Subject: [ruby-list:15679] about postgres-0.5.1 後藤@横河工事です。たびたびお世話になります。 ruby-1.3.4 postgres-0.5.1 postgreSQL-6.5 PHP3-3.0.7 上記の環境でpoastgresモジュールを使用して、postgreSQLデータベースのバックアップ とマスターデータの更新処理を行っていますが、以下のスクリプトがうまく動きません。 conn=PGconn.connect("localhost",5432,"","","test") res = conn.exec("copy s_jyunpou_table from '#{jyunpou}' using delimiters ',';") if res == nil then err_message="s_jyunpou_tableのcopyに失敗しました。" print err_message + "\n" exec("echo #{err_message} | /usr/sbin/sendmail goto@yokogawa-kouji.co.jp") end res.clear ここでコピーデータの日付データが 1999/02/31 のようにエラーとなるデータを 入れて、エラーmailを期待していたのですが、以下のようなエラーでスクリプトが ストップしてしまいました。なお109行目は res = conn.exec()の行です。 (スクリプト自体はエラーデータが無ければ正常にコピーを完了します) ./install_yacmo_data.rb:109:in `exec': server fatal error. Please report to your db administrator (PGError) from ./install_yacmo_data.rb:109 このようなエラー処理はできないのでしょうか。よろしくお願いします。