diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-07-07 21:19:27 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-07-07 21:19:27 +0000 |
commit | 3080b273a86d03a55b7d13c4596166d8f200c7ff (patch) | |
tree | afcd839e6cb7486cb70dae30ab1ea67ab011aaa7 /activerecord/lib | |
parent | c4233a0eaeceba0800990a4ae7eb2ab52a15c737 (diff) | |
download | rails-3080b273a86d03a55b7d13c4596166d8f200c7ff.tar.gz rails-3080b273a86d03a55b7d13c4596166d8f200c7ff.tar.bz2 rails-3080b273a86d03a55b7d13c4596166d8f200c7ff.zip |
PostgreSQL: correctly quote the ' in pk_and_sequence_for. Closes #5462.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4580 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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 a5af4ee821..5d42de1c6b 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -303,7 +303,7 @@ module ActiveRecord # the 8.1+ nextval('foo'::regclass). # TODO: assumes sequence is in same schema as table. result = query(<<-end_sql, 'PK and custom sequence')[0] - SELECT attr.attname, name.nspname, split_part(def.adsrc, '\\\'', 2) + SELECT attr.attname, name.nspname, split_part(def.adsrc, '''', 2) FROM pg_class t JOIN pg_namespace name ON (t.relnamespace = name.oid) JOIN pg_attribute attr ON (t.oid = attrelid) |