From 3080b273a86d03a55b7d13c4596166d8f200c7ff Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 7 Jul 2006 21:19:27 +0000 Subject: 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 --- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/connection_adapters') 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) -- cgit v1.2.3