Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-477

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

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: Platforms, Schema Managers
    • Security Level: All
    • Labels:
    • Environment:
      Any PostgreSQL environment

      Description

      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)

        Issue Links

          Activity

          jos de witte created issue -
          Hide
          Steve Müller added a comment -

          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?

          Show
          Steve Müller added a comment - 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?
          Steve Müller made changes -
          Field Original Value New Value
          Link This issue is referenced by DBAL-96 [ DBAL-96 ]

          This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

          • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-477, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              jos de witte
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: