7

So I'm trying to use citext, but it appears to be MIA from ubuntu 14.04 postgres install. Where can you find this mythical beast called citext for postgresql 9.3?

project_test=> CREATE TABLE "customers_addresstype" (
project_test(>     "id" serial NOT NULL PRIMARY KEY,
project_test(>     "customer_id" integer NOT NULL REFERENCES "customers_customer" ("id") DEFERRABLE INITIALLY DEFERRED,
project_test(>     "display" citext NOT NULL,
project_test(>     UNIQUE ("customer_id", "display")
project_test(> )
project_test-> ;
ERROR:  type "citext" does not exist
LINE 4:     "display" citext NOT NULL,
                      ^
project_test=> CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA ext;
ERROR:  could not open extension control file "/usr/share/postgresql/9.3/extension/citext.control": No such file or directory


$ ls /usr/share/postgresql/9.3/extension
plpgsql--1.0.sql  plpgsql.control  plpgsql--unpackaged--1.0.sql

$ ls /usr/lib/postgresql/9.3/lib
ascii_and_mic.so     euc_cn_and_mic.so   latin2_and_win1250.so  pgxs               utf8_and_big5.so      utf8_and_euc_jp.so   utf8_and_gbk.so        utf8_and_sjis2004.so
cyrillic_and_mic.so  euc_jp_and_sjis.so  latin_and_mic.so       plpgsql.so         utf8_and_cyrillic.so  utf8_and_euc_kr.so   utf8_and_iso8859_1.so  utf8_and_sjis.so
dict_snowball.so     euc_kr_and_mic.so   libpqwalreceiver.so    tsearch2.so        utf8_and_euc2004.so   utf8_and_euc_tw.so   utf8_and_iso8859.so    utf8_and_uhc.so
euc2004_sjis2004.so  euc_tw_and_big5.so  pg_upgrade_support.so  utf8_and_ascii.so  utf8_and_euc_cn.so    utf8_and_gb18030.so  utf8_and_johab.so      utf8_and_win.so

I don't see in the repository and locate -i citext finds nothing.

1

1 Answer 1

10

Turns out the answer was on Stack overflow. And Daniel commented on it right about the time I was installing it.

sudo apt-get install postgresql-contrib-9.3

https://stackoverflow.com/a/22833812/147562

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.