Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
* Fixed dumping of indexes for schema_search_path with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
donv committed Sep 18, 2013
1 parent ba5b64c commit bd7cdde
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module ActiveRecord
module ConnectionAdapters
module PostgresqlAdapter
def indexes(table_name, name = nil) #:nodoc:
schemas = schema_search_path.split(/,/).map { |p| quote(p) }.join(',')
schemas = schema_search_path.split(/,/).map { |p| quote(p.strip) }.join(',')
result = query(<<-SQL, name)
SELECT distinct i.relname, d.indisunique, d.indkey, pg_get_indexdef(d.indexrelid), t.oid,
m.amname, pg_get_expr(d.indpred, t.oid), pg_get_expr(d.indexprs, t.oid) as expression
Expand Down

0 comments on commit bd7cdde

Please sign in to comment.