pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Multiple Postgrest Verisons how to set one version as default.
3+ messages / 3 participants
[nested] [flat]

* Multiple Postgrest Verisons how to set one version as default.
@ 2023-04-29 12:28  Gautham Raj <gauthamrajsunny@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Gautham Raj @ 2023-04-29 12:28 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

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.*

   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.

Please look at the below screenshot.
[image: 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

Tried updating the PATH variable correctly with the latest version. But not
working.

[image: 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

Attachments:

Screenshot from 2023-04-28 21-14-29.png (image/png, 29.7K) download view image
Screenshot from 2023-04-28 21-28-44.png (image/png, 24.7K) download view image
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: Multiple Postgrest Verisons how to set one version as default.
@ 2023-04-29 14:05  Ron <ronljohnsonjr@gmail.com>
  parent: Gautham Raj <gauthamrajsunny@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Ron @ 2023-04-29 14:05 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 4/29/23 07: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.*
>
>  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.
>
> 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.

Are you absolutely 100% sure that /opt/rh//rh-postgresql95/root/usr/bin/psql 
is the correct path?

If nothing else, that looks looks like a filename, not a path. I think you 
should remove "/psql" from the *path*.

-- 
Born in Arizona, moved to Babylonia.

Attachments:

Screenshot from 2023-04-28 21-14-29.png (image/png, 29.7K) download view image
Screenshot from 2023-04-28 21-28-44.png (image/png, 24.7K) download view image
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: Multiple Postgrest Verisons how to set one version as default.
@ 2023-04-29 14:42  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Gautham Raj <gauthamrajsunny@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Adrian Klaver @ 2023-04-29 14:42 UTC (permalink / raw)
  To: Gautham Raj <gauthamrajsunny@gmail.com>; pgsql-general@lists.postgresql.org

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






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2023-04-29 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-04-29 12:28 Multiple Postgrest Verisons how to set one version as default. Gautham Raj <gauthamrajsunny@gmail.com>
2023-04-29 14:05 ` Ron <ronljohnsonjr@gmail.com>
2023-04-29 14:42 ` Adrian Klaver <adrian.klaver@aklaver.com>

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