Attempt to get uniform behavior for the PGconn object no matter if pg, postgres, or postgres-pr is used.
If no valid bytea unescaping method can be found, create one that raises an error
# File lib/sequel/adapters/postgres.rb, line 53 def self.unescape_bytea(obj) raise Sequel::Error, "bytea unescaping not supported with this postgres driver. Try using ruby-pg, ruby-postgres, or postgres-pr." end
# File lib/sequel/adapters/postgres.rb, line 62 def block(timeout=nil) end
If there is no #escape_bytea instance method, but there is an #escape_bytea class method, use that instead.
# File lib/sequel/adapters/postgres.rb, line 31 def escape_bytea(obj) self.class.escape_bytea(obj) end
If there is no #escape_string instance method, but there is an escape class method, use that instead.
# File lib/sequel/adapters/postgres.rb, line 17 def escape_string(str) Sequel::Postgres.force_standard_strings ? str.gsub("'", "''") : self.class.escape(str) end
# File lib/sequel/adapters/postgres.rb, line 69 def status CONNECTION_OK end