
if which postgres > /dev/null
    set --global --export POSTGRES (get_active_brew_dir (which postgres))
    set --global --export POSTGRES_BIN $POSTGRES/bin
end


if which postgres > /dev/null
    set --global --export POSTGRES_DATA /usr/local/var/postgres

    function start_postgres
        set --local logfile $argv[1]
        if [ -z $logfile ]
            set logfile ~/postgres.log
        end

        pg_ctl start --pgdata $POSTGRES_DATA --log $logfile
    end

    function stop_postgres
        pg_ctl stop --pgdata $POSTGRES_DATA
    end
end

Add PostgreSQL startup and shutdown functions
Add PostgreSQL startup and shutdown functions

lee-dohm/environment,lee-dohm/environment,lee-dohm/environment