diff options
author | Paul Gallagher <gallagher.paul@gmail.com> | 2011-06-11 02:07:08 +0800 |
---|---|---|
committer | Paul Gallagher <gallagher.paul@gmail.com> | 2011-06-11 02:21:24 +0800 |
commit | 1d7c751bf703c729887e2d8a9ae104a8e6aef010 (patch) | |
tree | 948b3b7a008be903ba535ebfcd8e9d5c0b950103 /activerecord/lib/active_record/connection_adapters | |
parent | 019c263633242f4329f44f863705435f58e1d884 (diff) | |
download | rails-1d7c751bf703c729887e2d8a9ae104a8e6aef010.tar.gz rails-1d7c751bf703c729887e2d8a9ae104a8e6aef010.tar.bz2 rails-1d7c751bf703c729887e2d8a9ae104a8e6aef010.zip |
remove table quoting in primary_key method
* add/cleanup tests
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 0ef871749f..03a9624357 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -864,7 +864,7 @@ module ActiveRecord # Returns just a table's primary key def primary_key(table) - row = exec_query(<<-end_sql, 'SCHEMA', [[nil, quote_table_name(table)]]).rows.first + row = exec_query(<<-end_sql, 'SCHEMA', [[nil, table]]).rows.first SELECT DISTINCT(attr.attname) FROM pg_attribute attr INNER JOIN pg_depend dep ON attr.attrelid = dep.refobjid AND attr.attnum = dep.refobjsubid |