I want to use the hstore type in postgresql.

Asked 2 years ago, Updated 2 years ago, 46 views

Environment
CentOS Release 6.8
I installed it with contrib...yum, but the folder contrib is not created in pgsql.
When you type the psql command, psql (8.4.xx, server 9.1.xx) appears.
Is the postgresql version probably 9.1?

I forgot to mention that I have created two database clusters so that I can use two postgres.Change the port

I would like to use hstore in postgresql.
I put yum install postgresql-contrib.x86_64 which seems to contain hstore.control in yum.
In order to re-enable the hstore type,
Create EXTENSION hstore; but
ERROR: could not open extension control file "/path/extension/hstore.control": ENOENT
It is said that there is no file.

When I actually checked the file, it was not found.
Please give me guidance.

Is there anything missing?
There seems to be no hstore data...
I think the installation went well...

================================================
Results
As a result, the psql version seemed to be 8.4 to 9.1, and the 9.1 data seemed to have a different path.
I deleted the previous psql, and after that, I was able to install the hstore type and it worked well, and the hstore type worked without any problems, and everything was solved.
Thank you, everyone.

sql postgresql

2022-09-30 11:34

1 Answers

For CentOS 6.8, the version of PostgreSQL (including contrib) installed from the yum repository of CentOS should be 8.4.20.
9.1.x is expected to have been installed in a different way, so I think postgresql-contrib will be installed in the same way to make hstore EXTENSION available.

# If you installed it from PostgreSQL yum repository, it should be the RPM name with the version name postgresql91-contrib.


2022-09-30 11:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.