Permalink
Browse files

improve pg compatibility

  • Loading branch information...
1 parent 5ea8f10 commit c55f4b49b4f372648d209672cb24292b75edcff9 @funny-falcon committed Nov 25, 2011
Showing with 9 additions and 1 deletion.
  1. +6 −0 lib/postgres-pr/pg-compat.rb
  2. +2 −0 lib/postgres-pr/typeconv/bytea.rb
  3. +1 −1 lib/postgres-pr/version.rb
View
6 lib/postgres-pr/pg-compat.rb
@@ -3,8 +3,12 @@
require 'rexml/syncenumerator'
require 'postgres-pr/connection'
+require 'postgres-pr/typeconv/conv'
+require 'postgres-pr/typeconv/bytea'
class PGconn
+ extend Postgres::Conversion
+ include Postgres::Conversion
PQTRANS_IDLE = 0 #(connection idle)
PQTRANS_INTRANS = 2 #(idle, within transaction block)
PQTRANS_INERROR = 3 #(idle, within failed transaction)
@@ -33,6 +37,8 @@ def close
@conn.close
end
+ alias finish close
+
attr_reader :host, :db, :user
def query(sql)
View
2 lib/postgres-pr/typeconv/bytea.rb
@@ -27,4 +27,6 @@ def decode_bytea(str)
}
end
end
+
+ alias unescape_bytea decode_bytea
end
View
2 lib/postgres-pr/version.rb
@@ -1,3 +1,3 @@
module PostgresPR
- VERSION = "0.6.8"
+ VERSION = "0.6.9"
end

0 comments on commit c55f4b4

Please sign in to comment.