aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarmo Tänav <tarmo@itech.ee>2008-08-22 09:44:38 +0300
committerTarmo Tänav <tarmo@itech.ee>2008-08-22 10:37:09 +0300
commitd3b894563a114912113b816f07ed16511363fb65 (patch)
tree7d0849b9c366e87389525afab95250f9ed0ba16d
parentab33b27947864d94be667db836e0ad7497575d13 (diff)
downloadrails-d3b894563a114912113b816f07ed16511363fb65.tar.gz
rails-d3b894563a114912113b816f07ed16511363fb65.tar.bz2
rails-d3b894563a114912113b816f07ed16511363fb65.zip
Properly quote CREATE DATABASE parameters in postgresql [#771 state:resolved]
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb6
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 74da0d9c85..723e1a42dd 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