Re: Where is my app installed? - Mailing list pgsql-general

From Tom Lane
Subject Re: Where is my app installed?
Date
Msg-id 2115389.1724379712@sss.pgh.pa.us
Whole thread Raw
In response to Re: Where is my app installed?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Where is my app installed?
List pgsql-general
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 8/22/24 17:36, Arbol One wrote:
>> After installing PostgreSQL on my Debian-12 machine, I typed 'postgres 
>> --version' and got this msg:
>> *bash: postgres: command not found*
>> 'psql --version', however, does work and gives me this message :
>> *psql (PostgreSQL) 16.3 (Debian 16.3-1.pgdg120+1)*
>> Obviously postgres is not in the path, but I don't know where the 
>> 'apt-get' installed it or why it did not add it to the path.

> As to where the  postgres command is:
> ls -al /usr/lib/postgresql/16/bin/

Theory 1: postgres is packaged in a "postgresql-server" package
and the OP only installed the base (client-side) package.

Theory 2: postgres is installed into some directory not in the OP's
PATH, such as /usr/sbin.  Since it's primarily used as a daemon,
this'd be a reasonable thing for a packager to do.

I'd bet a nickel on #1, though, because I've not seen too many
packagers put postgres somewhere other than where they put psql.
"Separate server package" is extremely common though.

            regards, tom lane



pgsql-general by date:

Previous
From: Alan Hodgson
Date:
Subject: Re: Where is my app installed?
Next
From: Adrian Klaver
Date:
Subject: Re: Where is my app installed?