Uploaded image for project: 'Nuxeo ECM Build/Test Environment'
  1. Nuxeo ECM Build/Test Environment
  2. NXBT-2392

Surround the database name with quotes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: NXFT-1.6
    • Fix Version/s: NXFT-1.8.5
    • Component/s: nuxeo-ftest

      Description

      drive-tests.pgsql-dbdrop:
      [INFO]       [sql] Executing commands
      [ERROR]       [sql] Failed to execute:  DROP DATABASE IF EXISTS mac-drive-1
      [ERROR] 
      BUILD FAILED - at 19/07/18 14:53
      .../ftest/target-osxslave-drive/nuxeo-ftest.xml:1415: The following error occurred while executing this line:
      .../ftest/target-osxslave-drive/nuxeo-ftest.xml:957: org.postgresql.util.PSQLException: ERROR: syntax error at or near "-"
      

      The fix is as simple as adding quotes around the database name (thanks to Julien Carsique):

      psql
      
      template1=# DROP DATABASE IF EXISTS mac-drive-1;
      ERROR:  syntax error at or near "-"
      LIGNE 1 : DROP DATABASE IF EXISTS mac-drive-1;
                                           ^
      
      template1=# DROP DATABASE IF EXISTS "mac-drive-1";
      NOTICE:  database "mac-drive-1" does not exist, skipping
      DROP DATABASE
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m