Language support on SQL PostgreSQL

205 views
Skip to first unread message

Samuel ROZE

unread,
Mar 14, 2018, 5:20:00 AM3/14/18
to Google Cloud SQL discuss
Good morning,

I'm trying to use Postgres' full-text search capabilities and I have the following issue:

database=> SELECT uuid, ts_rank_cd(to_tsvector(name), to_tsquery('word')) AS score FROM travel;
ERROR: SQLSTATE[42704]: Undefined object: 7 ERROR: text search configuration "pg_catalog.english" does not exist

The error is clear enough, I have to say, there isn't much in the "pg_ts_config" table:

database=> select * from pg_ts_config;
 cfgname | cfgnamespace | cfgowner | cfgparser
---------+--------------+----------+-----------
 simple  |           11 |       10 |      3722
(1 row)

Based on this thread on the PostgreSQL's mailing-list, it looks like something has to be installed first. Is there any way to get this working with Google Cloud SQL PostgreSQL?

Thank you very much,
Samuel.

Karthick (Cloud Platform Support)

unread,
Mar 14, 2018, 2:04:04 PM3/14/18
to Google Cloud SQL discuss
Hello Samuel,

What are you seeing on your instance? There is a Feature Request to support for multiple text search configuration, including English on the Postgres. 

postgres=> \dFd
                             List of text search dictionaries
   Schema   |      Name       |                        Description
------------+-----------------+-----------------------------------------------------------
 pg_catalog | danish_stem     | snowball stemmer for danish language
 pg_catalog | dutch_stem      | snowball stemmer for dutch language
 pg_catalog | english_stem    | snowball stemmer for english language
 pg_catalog | finnish_stem    | snowball stemmer for finnish language
 pg_catalog | french_stem     | snowball stemmer for french language
 pg_catalog | german_stem     | snowball stemmer for german language
 pg_catalog | hungarian_stem  | snowball stemmer for hungarian language
 pg_catalog | italian_stem    | snowball stemmer for italian language
 pg_catalog | norwegian_stem  | snowball stemmer for norwegian language
 pg_catalog | portuguese_stem | snowball stemmer for portuguese language
 pg_catalog | romanian_stem   | snowball stemmer for romanian language
 pg_catalog | russian_stem    | snowball stemmer for russian language
 pg_catalog | simple          | simple dictionary: just lower case and check for stopword
 pg_catalog | spanish_stem    | snowball stemmer for spanish language
 pg_catalog | swedish_stem    | snowball stemmer for swedish language
 pg_catalog | turkish_stem    | snowball stemmer for turkish language
Reply all
Reply to author
Forward
0 new messages