This project is archived and is in readonly mode.

#456 ✓duplicate
Roel van der Hoorn

PostgreSQL: name in CREATE DATABASE is not properly escaped

Reported by Roel van der Hoorn | June 20th, 2008 @ 09:06 AM | in 2.1.1

The name of the new database is not properly escaped on line 509 of the postgresql_adapter.rb. This gives problems when for example your database name contains dots. Changing the line to the following fixes the problem (single quotes do not fix the problem):

execute "CREATE DATABASE \"#{name}\"#{option_string}"

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages