lib/pgslice/helpers.rb in pgslice-0.4.6 vs lib/pgslice/helpers.rb in pgslice-0.4.7

- old
+ new

@@ -34,10 +34,14 @@ # remove schema @schema = Array(params.delete("schema") || "public")[0] uri.query = URI.encode_www_form(params) ENV["PGCONNECT_TIMEOUT"] ||= "1" - PG::Connection.new(uri.to_s) + conn = PG::Connection.new(uri.to_s) + conn.set_notice_processor do |message| + say message + end + conn end rescue PG::ConnectionBad => e abort e.message rescue URI::InvalidURIError abort "Invalid url"