From 13ac3fe5a21473b6d36bb64b093cd3e62611752e Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Tarmo=20T=C3=A4nav?= Date: Fri, 22 Aug 2008 09:44:38 +0300 Subject: [PATCH] Properly quote CREATE DATABASE parameters in postgresql --- .../connection_adapters/postgresql_adapter.rb | 6 +++--- 1 files changed, 3 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 74da0d9..723e1a4 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -534,13 +534,13 @@ module ActiveRecord option_string = options.symbolize_keys.sum do |key, value| case key when :owner - " OWNER = '#{value}'" + " OWNER = \"#{value}\"" when :template - " TEMPLATE = #{value}" + " TEMPLATE = \"#{value}\"" when :encoding " ENCODING = '#{value}'" when :tablespace - " TABLESPACE = #{value}" + " TABLESPACE = \"#{value}\"" when :connection_limit " CONNECTION LIMIT = #{value}" else -- 1.5.6.5