PostgreSQL 9.3.15 | Type "citext" does not exist

Author - Manju Kashyap
20.02.2019
|
0 Comments
|

ERROR: type “citext” does not exist (on PostgreSQL 9.3.15)

While creating a table (email_notifications), we were facing this error type “citext” does not exist. The syntax of creating table and the error is shown in the screenshot below :
PostgreSQL 9.3.15 | Type "citext" does not exist

Then we tried some solutions from internet like :

1. Tried to execute CREATE EXTENSION IF NOT EXISTS citext, as in the following screenshot :
PostgreSQL 9.3.15 | Type "citext" does not exist

2. Then tried to check by running following command in the terminal :

find /usr -name postgis.control

It was showing following error :

find: `/usr/share/doc/google-chrome-stable': Permission denied

The reason was : extension/postgis.control wasn’t installed.

Solution: The solution was just to install the extension/postgis.control by running following command in the terminal :

sudo apt-get install postgis*

After that, restarted apache using following command :

sudo service apache2 restart

Now, the extension/postgis.control was successfully installed and after restarting the postgresql database, executed the same postgres commands as we have tried earlier i.e.
CREATE EXTENSION IF NOT EXISTS citext;

This time, it got executed successfully and then the table was also successfully created without any problem.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published. Required fields are marked *