f3-factory / fatfree-core

Fat-Free Framework core library
GNU General Public License v3.0
206 stars 89 forks source link

Postgresql DB Name with space breaks SQL Mapper #316

Closed ykgamma closed 3 years ago

ykgamma commented 4 years ago

When creating a DB\SQL object, spaces in the dbname are escaped by \ characters as required by the DSN. However, when the dbname is extracted from the DSN, the escape \ characters are not removed.

This will cause the schema method to not return any fields as table name will have \ characters in the query. This results in the Mapper not having any fields when accessed.

xfra35 commented 4 years ago

Can you give an example? I tried connecting to a MySQL database containing a space without any problem: mysql:host=127.0.0.1;port=3306;dbname=foo bar

Is this a postgreSQL specificity?

ikkez commented 3 years ago

fixed