• pg_dump - exclude tables doesn't work with shell variables

    From Magnus Warker@21:1/5 to All on Thu Apr 14 04:02:58 2016
    Hello,

    when I call pg_dump directly like this, it works fine:

    pg_dump -Uwww -w -T'mig_*' mydb > test.sql

    But when I build the commandline within a script with variables, the
    table exclusion doesn't work:

    #!/bin/sh

    OPT="-Uwww -w -T'mig_*'"
    f=test.sql

    pg_dump $OPT mydb > $f

    The dump is created, but it still contains the tables beginnig with "mig_".

    What's wrong?

    Thanks
    Magnus

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)