aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-08-28 14:23:29 +0200
committerYves Senn <yves.senn@gmail.com>2015-08-28 14:23:29 +0200
commit3c6bb892715a43b0e02336277f2dd2552fa68af4 (patch)
tree86a872dd9cc5482fb75cd73e622818979365126f
parentdd118dcc45bfb8e26c023d0ae0492b8208aa03e2 (diff)
downloadrails-3c6bb892715a43b0e02336277f2dd2552fa68af4.tar.gz
rails-3c6bb892715a43b0e02336277f2dd2552fa68af4.tar.bz2
rails-3c6bb892715a43b0e02336277f2dd2552fa68af4.zip
pg docs, `connection.tables` does not use the `name` argument.
[ci skip] Currently the `#tables` method does not make use of the `name` argument and always returns all the tables in the schema search path. However the docs suggest different behavior. While we should porbably adjust the implementation to provide this behavior, let's make the docs right for now (also for `4-2-stable`) and then implement the behavior on `master`.
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
index d1a02991f6..21268b63b1 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
@@ -68,7 +68,7 @@ module ActiveRecord
execute "DROP DATABASE IF EXISTS #{quote_table_name(name)}"
end
- # Returns the list of all tables in the schema search path or a specified schema.
+ # Returns the list of all tables in the schema search path.
def tables(name = nil)
select_values("SELECT tablename FROM pg_tables WHERE schemaname = ANY(current_schemas(false))", 'SCHEMA')
end