You can install ‘tablefunc' extension and for that you have to follow below steps:
To install 'tablefunc' extension you have to install 'postgresql-contrib' package:
First you have to login into PostgreSQL with commands.
After login connect to the database and install 'tablefunc' extension:
For example, if database name is ‘host_pgtest’
And now we can install tablefunc extension:
Now this extension is installed on server.
To install 'tablefunc' extension you have to install 'postgresql-contrib' package:
Code:
yum install postgresql-contrib
Code:
psql -U postgres
Code:
\c $your_database_name_here;
Code:
\c host_pgtest;
Code:
CREATE EXTENSION tablefunc;
Code:
cptech_pgtest=# \dx
List of installed extensions
Name | Version | Schema | Description
-----------+---------+------------+------------------------------------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
tablefunc | 1.0 | public | functions that manipulate whole tables, including crosstab
(2 rows)