Permalink
Browse files

Properly quote CREATE DATABASE parameters in postgresql [#771 state:r…

…esolved]
  • Loading branch information...
1 parent 104220e commit a6619865d0191c1001d1f25e8f4d111a0e9f78d2 @tarmo tarmo committed Aug 22, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -530,13 +530,13 @@ def create_database(name, options = {})
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

0 comments on commit a661986

Please sign in to comment.