Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-453

PostgreSqlSchemaManager::getSchemaSearchPaths does not work for secondary schemas


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.3.4
    • Component/s: Schema Managers
    • Security Level: All
    • Labels:
    • Environment:
      Postgresql 9.1 on Ubuntu 12.04


      PostgreSqlSchemaManager::getSchemaSearchPaths() uses "SHOW search_path" to get the current search path for the connection and explodes it using a comma delimiter. On my installation Postgresql 9.1 on Ubuntu 12.04 "SHOW search__path" returns the schemas in the search path separated by ", " (i.e. a comma followed by a space). This means that the array of schemas returned by getSchemaSearchPaths() will including a leading space on the schema names for the second and subsequent schemas in the search list.

      This is a particular problem if you call PostgreSqlSchemaManager::getExistingSchemaSearchPaths() because that calls determineExistingSchemaSearchPaths() which filters the list from getSchemaSearchPaths() to make sure they are in the list of schemas in the database (as returned from getSchemaNames(). The second and subsequent schemas in the search path still have a leading space when they are compared to the array of schema names, and consequently they do not match and are not included in the array returned by getExistingSchemaSearchPaths().

      I think that getSchemaSearchPaths should trim the leading space from the schemas.


        Roger Hunwicks created issue -
        Benjamin Eberlei added a comment -

        Fixed in 2.3.4

        Benjamin Eberlei added a comment - Fixed in 2.3.4
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.3.4 [ 10421 ]
        Resolution Fixed [ 1 ]

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

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


          • Assignee:
            Benjamin Eberlei
            Roger Hunwicks
          • Votes:
            0 Vote for this issue
            2 Start watching this issue


            • Created: