Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What happens if you run your locally installed psql directly?</p> <pre><code>/usr/local/bin/psql ... </code></pre> <p>If that works then it's the path you need to change. You can just try running the export in a terminal, then <code>which psql</code>. If that doesn't pick up the right psql then check the export worked with</p> <pre><code>echo $PATH </code></pre> <p>I'm not sure which .xxrc file you'll need to update then - not got a mac to hand I'm afraid, but at least you'll know the command will work.</p> <p>Oh - I keep several different versions of PostgreSQL around and find it useful to have some aliases set up:</p> <pre><code>alias psql90='/usr/local/pgsql90/bin/psql -p 5490' alias psql84='/usr/local/pgsql84/bin/psql -p 5484' alias pg_dump90=... </code></pre> <hr> <p>Your <code>$PATH</code> is just a list of directories to check separated by ":". It starts <code>/opt/local/bin</code> rather than <code>/usr/local/bin</code> and if you look further along you'll see <code>/usr/bin</code> coming before <code>/usr/local/bin</code>. So - we need to do two things:</p> <ol> <li>Find out which psql we actually want</li> <li>Make sure we can edit our PATH</li> </ol> <p>Firstly - find your postgresql.conf file and check what port you are running on. There are three items of interest: <code>listen_addresses</code>, <code>port</code> and <code>unix_socket_directory</code>. Then we'll see if there's a socket there.</p> <pre><code>ls -a &lt;your unix_socket_directory&gt; </code></pre> <p>You should see a "file" something like ".s.PGSQL.5432" where the 5432 is the port number from your config file. If there's no such file, it's not running and it's time to get it running. You may need to change the port number in the config file if it matches Apple's existing usage.</p> <p>Then find what psql installations exist</p> <pre><code>find /usr -type f -name psql find /opt -type f -name psql </code></pre> <p>Try and figure out which one you need, perhaps add --version to help.</p> <p>Then, let's see about editing your PATH. You must have some changes in your settings file anyway, so let's see if we can find where that setting is.</p> <pre><code>grep -l 'local/bin' ~/.*rc </code></pre> <p>That should list filenames containing local/bin - have a look and see if they are editing your PATH.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload