From: volodymyr.volynets@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14564: Unable to create GIN index for character type
Date: Wed, 22 Feb 2017 16:07:42 +0000
Message-ID: <20170222160742.1465.72081@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14564
Logged by: Volodymyr Volynets
Email address: volodymyr.volynets@gmail.com
PostgreSQL version: 9.4.5
Operating system: OSX x86_64-apple-darwin
Description:
Hi,
1) Here's create table statement:
CREATE TABLE cm_countries
(
cm_country_tenant_id integer NOT NULL,
cm_country_code character(2) NOT NULL,
cm_country_name character varying(120) NOT NULL,
cm_country_code3 character(3) NOT NULL,
cm_country_number smallint DEFAULT 0,
cm_country_region_id smallint DEFAULT 0,
cm_country_sub_region_id smallint DEFAULT 0,
cm_country_inactive smallint NOT NULL DEFAULT 0,
CONSTRAINT cm_countries_pk PRIMARY KEY (cm_country_tenant_id,
cm_country_code)
);
2) I added btree_gin extension:
CREATE EXTENSION btree_gin
SCHEMA pg_catalog
VERSION "1.0";
3) Trying to create gin index:
CREATE INDEX cm_countries_fulltext_idx ON cm_countries USING gin
(cm_country_code, cm_country_name);
Error:
ERROR: data type character has no default operator class for access method
"gin"
HINT: You must specify an operator class for the index or define a default
operator class for the data type.
********** Error **********
ERROR: data type character has no default operator class for access method
"gin"
SQL state: 42704
Hint: You must specify an operator class for the index or define a default
operator class for the data type.
4) Looked into operator classes for gin:
index_method,opclass_name,opfamily_name,indexed_type,is_default
"gin", "char_ops", "char_ops", ""char"", t
Is it possible to add operator class for type "character" in addition to
type "char"?
Thank you!
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: volodymyr.volynets@gmail.com
Subject: Re: BUG #14564: Unable to create GIN index for character type
In-Reply-To: <20170222160742.1465.72081@wrigleys.postgresql.org>
References: <20170222160742.1465.72081@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox