diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-05 22:21:01 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-06 16:39:29 -0300 |
commit | de360ac565b5fea40f154f03fde3f74f0b4b31a8 (patch) | |
tree | b772e3048eee16d311e1a7d0e025e8c61fb3f55d /activerecord/lib | |
parent | 98967293cfef14a70281b47c4a07b5318f94d668 (diff) | |
download | rails-de360ac565b5fea40f154f03fde3f74f0b4b31a8.tar.gz rails-de360ac565b5fea40f154f03fde3f74f0b4b31a8.tar.bz2 rails-de360ac565b5fea40f154f03fde3f74f0b4b31a8.zip |
Merge pull request #7850 from senny/5920_postgres_adapter_table_with_capital_letters
postgres, quote table names when fetching the primary key (#5920)
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
Diffstat (limited to 'activerecord/lib')
-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 5108f4113f..ca9a29a5cb 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -999,7 +999,7 @@ module ActiveRecord INNER JOIN pg_depend dep ON attr.attrelid = dep.refobjid AND attr.attnum = dep.refobjsubid INNER JOIN pg_constraint cons ON attr.attrelid = cons.conrelid AND attr.attnum = cons.conkey[1] WHERE cons.contype = 'p' - AND dep.refobjid = '#{table}'::regclass + AND dep.refobjid = '#{quote_table_name(table)}'::regclass end_sql row && row.first |