dbal icon indicating copy to clipboard operation
dbal copied to clipboard

DBAL-477: Just doublequote all schema names and field names in PostgreSQL sql command generation, and the same for MySQL

Open doctrinebot opened this issue 12 years ago • 2 comments

Jira issue originally created by user josdewitte:

Generation of any SQL command to the database (From entities or migration versions) does not quote all the reserved keywords (For example a fieldname right.

Simple fix that always works: double-quote dbname, schemaname and fieldname

e.g "dbsecurity"."userschema"."users" or "tblusers"

MySQL : use the ` sign.

e.g security.users or tblusers (No support for schemas since I last checked some time ago)

doctrinebot avatar Mar 28 '13 22:03 doctrinebot

Comment created by @deeky666:

If those are reserved keywords, they should be added to the "PostgreSQLKeywords" class and they will be quoted by Doctrine. As far as I can see those keywords mentioned are not present in this class. Maybe there is something missing?

doctrinebot avatar Jun 24 '13 23:06 doctrinebot

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Oct 04 '22 00:10 github-actions[bot]