diff options
author | Dan Pickett <dpickett@enlightsolutions.com> | 2011-04-29 19:18:10 -0400 |
---|---|---|
committer | Dan Pickett <dpickett@enlightsolutions.com> | 2011-04-29 19:18:10 -0400 |
commit | 1efaed5af13f876833b3acd614e8d0116812f308 (patch) | |
tree | 8b2dd01afee8b4bdcf976d6a082d9fb89b32d43e /activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | |
parent | 85c8d73642f03410b86ee842edcfe0eba1d4252c (diff) | |
parent | 010dbf7a2fd30f8dabebb3f04fed22c661d6bf80 (diff) | |
download | rails-1efaed5af13f876833b3acd614e8d0116812f308.tar.gz rails-1efaed5af13f876833b3acd614e8d0116812f308.tar.bz2 rails-1efaed5af13f876833b3acd614e8d0116812f308.zip |
Merge branch 'master' of github.com:lifo/docrails
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 f3e0248e39..70d3d58c8f 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 @@ -681,7 +682,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) @@ -846,6 +847,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 @@ -930,7 +934,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 |