PostgreSQL environment file on Mac OSX?

后端 未结 1 1948
孤街浪徒
孤街浪徒 2021-01-24 02:53

PostgreSQL seems to have an environment file that allows settings environment variables. On Linux (Kubuntu 11.10 in my case), it is located at e.g. /etc/postgresql/8.4/mai

1条回答
  •  孤城傲影
    2021-01-24 03:42

    There is no standard way to specify environment variables for PostgreSQL, I assume that file is Kubuntu specific.

    What I did to ease my life was copying approach used by ORACLE:

    • I have /etc/pgtab file on each server where I run PostgreSQL databases;
    • I specify each cluster I run on a single line in the /etc/pgtab;
    • I've created a script pgenv which based on the /etc/pgtab shows the menu of clusters (in case there're more then just one) and initialize all PATHs and variables.

    It works on my MacBookPro and on all Linux and HP-UX based servers.

    0 讨论(0)
提交回复
热议问题