Permalink
Browse files

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

…esolved]
  • Loading branch information...
1 parent ab33b27 commit d3b894563a114912113b816f07ed16511363fb65 @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
@@ -534,13 +534,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 d3b8945

Please sign in to comment.