pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Gautham Raj <gauthamrajsunny@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Multiple Postgrest Verisons how to set one version as default.
Date: Sat, 29 Apr 2023 07:42:04 -0700
Message-ID: <f5e5932d-d7a1-7fae-c84c-b1256e3a2fb1@aklaver.com> (raw)
In-Reply-To: <CAHByZMBDee03zvx6v=irzAfbtz_p=METeDWPcr27e+D60P-h9g@mail.gmail.com>
References: <CAHByZMBDee03zvx6v=irzAfbtz_p=METeDWPcr27e+D60P-h9g@mail.gmail.com>

On 4/29/23 05:28, Gautham Raj wrote:
> Hi,
> 
> *Problem: Having multiple versions of Postgres installed in CentOS 7. I 
> Want to set the 9.5 version as default. Not able to access Postgres 9.5 
> through the terminal as well.*

Not clear if you want to have the default psql client be 9.5 or the 
Postgres server be 9.5?

> 
>  1. For Command *psql --version* I'm getting 9.5 as the version.
>  2. For Command *sudo -u postgres psql *I'm getting 9.2 as the version.

Why are you doing 2)?

> 
> Please look at the below screenshot.
> Screenshot from 2023-04-28 21-14-29.png
> 
> *Background: *By default, the server has a 9.2 version I installed the 
> *rh-postgresql95* version from the below article.
> Used the below command to install *rh-postgresql95*
> 
>     yum
>     <https://www.server-world.info/en/command/html/yum.html> --enablerepo=centos-sclo-rh -y install rh-postgresql95-postgresql-server
> 
> https://www.server-world.info/en/note?os=CentOS_7&p=postgresql95&f=1 
> <https://www.server-world.info/en/note?os=CentOS_7&p=postgresql95&f=1;
> 
> Tried updating the PATH variable correctly with the latest version. But 
> not working.
> 
> Screenshot from 2023-04-28 21-28-44.png
> 
> 
> Please share the steps or any guidance on how to resolve the issue.
> 
> Thank you so much. Anything would be helpful.
> 
> Thanks & Regards,
> Gautham

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (3+ messages)

Message-ID: <f5e5932d-d7a1-7fae-c84c-b1256e3a2fb1@aklaver.com>
Permalink:  ../f5e5932d-d7a1-7fae-c84c-b1256e3a2fb1@aklaver.com/
Also on:    postgresql.org/message-id/f5e5932d-d7a1-7fae-c84c-b1256e3a2fb1@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, gauthamrajsunny@gmail.com
  Subject: Re: Multiple Postgrest Verisons how to set one version as default.
  In-Reply-To: <f5e5932d-d7a1-7fae-c84c-b1256e3a2fb1@aklaver.com>
  References: <CAHByZMBDee03zvx6v=irzAfbtz_p=METeDWPcr27e+D60P-h9g@mail.gmail.com> <f5e5932d-d7a1-7fae-c84c-b1256e3a2fb1@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox