Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-8177

postgresql : can't use metacommands when setting search_path in postgresql_psql

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: postgresql
    • Labels:
      None
    • Template:
      MODULES Bug Template
    • Team:
      Modules
    • QA Risk Assessment:
      Needs Assessment

      Description

      This is not possible:

      $ psql somedb -c "set search_path to someschema; \i /var/lib/pgsql/someschema_tables.sql;"
      ERROR: syntax error at or near "\"
      LINE 1: set search_path to someschema; \i /var/lib/pgsql/someschema_...

      This needs to be:

      $ psql somedb -c "set search_path to someschema;" -c "\i /var/lib/pgsql/someschema_tables.sql;"

      The module code needs to use multiple -c calls instead of concatenating the command string.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Uniplexed Rodrigo Pereira
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support