Permalink
Browse files

Query for loading index info should be marked as SCHEMA.

  • Loading branch information...
1 parent 1b7894c commit 8933efb9fbcfd67c68d80065873fb381ef9bfc36 @kennyj kennyj committed Sep 15, 2012
@@ -111,7 +111,7 @@ def indexes(table_name, name = nil)
inddef = row[3]
oid = row[4]
- columns = Hash[query(<<-SQL, "Columns for index #{row[0]} on #{table_name}")]
+ columns = Hash[query(<<-SQL, "SCHEMA")]
SELECT a.attnum, a.attname
FROM pg_attribute a
WHERE a.attrelid = #{oid}
@@ -403,7 +403,7 @@ def indexes(table_name, name = nil) #:nodoc:
table_name,
row['name'],
row['unique'] != 0,
- exec_query("PRAGMA index_info('#{row['name']}')", "Columns for index #{row['name']} on #{table_name}").map { |col|
+ exec_query("PRAGMA index_info('#{row['name']}')", "SCHEMA").map { |col|
col['name']
})
end

0 comments on commit 8933efb

Please sign in to comment.