how to use pg_bigm

how to use pg_bigm

hrk1l2x

1 minute read

pg_bigm

what is bg_bigm ?

  • it is module which can use on PostgreSQL
  • it provide full-text search engine.
  • user can create index for full-text search engine and seach string fast.

how to install module

$ curl -L 'https://ja.osdn.net/frs/redir.php?m=iij&f=%2Fpgbigm%2F66565%2Fpg_bigm-1.2-20161011.tar.gz' -o pg_bigm-1.2-20161011.tar.gz
$ tar xzf pg_bigm-1.2-20161011.tar.gz
$ cd pg_bigm-1.2-20161011
$ make USE_PGXS=1 PG_CONFIG=/usr/pgsql-9.6/bin/pg_config
$ make USE_PGXS=1 PG_CONFIG=/usr/pgsql-9.6/bin/pg_config install

activate

$ psql {db_name}
db_name=# CREATE EXTENSION pg_bigm;

function of full-text search engine

=# CREATE TABLE a (b text, c text);
=# CREATE INDEX d ON a USING gin (description gin_bigm_ops);
=# SELECT * FROM a WHERE b LIKE '%bbb%';

uninstall module

$ make USE_PGXS=1 PG_CONFIG=/opt/pgsql-X.Y.Z/bin/pg_config uninstall
comments powered by Disqus