diff options
author | Xavier Noria <fxn@hashref.com> | 2011-05-01 11:16:31 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-05-01 11:16:31 +0200 |
commit | 2fbf302149cf40c791ca1207a5f984cf58903397 (patch) | |
tree | 5da770d0fd31520a6264a9864b1db1412646d100 /activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | |
parent | a0656989c47c29c87c4f243ce3695c39777c67b8 (diff) | |
parent | b84b759ec60b5005fea183186639408fcf903450 (diff) | |
download | rails-2fbf302149cf40c791ca1207a5f984cf58903397.tar.gz rails-2fbf302149cf40c791ca1207a5f984cf58903397.tar.bz2 rails-2fbf302149cf40c791ca1207a5f984cf58903397.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
railties/guides/source/contributing_to_ruby_on_rails.textile
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 3b0d960acc..37db2be7a9 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -294,7 +294,7 @@ module ActiveRecord NATIVE_DATABASE_TYPES end - # Does PostgreSQL support migrations? + # Returns true, since this connection adapter supports migrations. def supports_migrations? true end @@ -320,6 +320,7 @@ module ActiveRecord true end + # Returns true, since this connection adapter supports savepoints. def supports_savepoints? true end @@ -682,7 +683,7 @@ module ActiveRecord [schema, table] end - # Returns the list of all indexes for a table. + # Returns an array of indexes for the given table. def indexes(table_name, name = nil) schemas = schema_search_path.split(/,/).map { |p| quote(p) }.join(',') result = query(<<-SQL, name) @@ -847,6 +848,9 @@ module ActiveRecord end # Renames a table. + # + # Example: + # rename_table('octopuses', 'octopi') def rename_table(name, new_name) execute "ALTER TABLE #{quote_table_name(name)} RENAME TO #{quote_table_name(new_name)}" end @@ -931,7 +935,7 @@ module ActiveRecord end protected - # Returns the version of the connected PostgreSQL version. + # Returns the version of the connected PostgreSQL server. def postgresql_version @connection.server_version end |