Postgresql pgsql plug-in pg_trgm, rum

Related links:
pgsql compilation and installation

1. Description

Both pg_trgm and rum can be used as fuzzy queries. pg_trgm is a plug-in that comes with the official installation package. Rum needs to be downloaded from the project address.

2. Installation

Using source code compilation method

(1) pg_trgm installation

1. Enter the contrib directory of the source code package

Write the directory location according to the actual situation

cd /usr/local/postgresql-16.0/contrib/pg_trgm

2. Compile and install

make && make install

3. Enable in database

Enter in the psql command line or the sql of the remote management tool

create extension pg_trgm;

(2) rum installation

rum github project address

1. Download the program from the official website

Enter the source code directory of the installation package (it can only be placed in the contrib directory of the source code package to compile normally)

cd /usr/local/postgresql-16.0/contrib

Download via git (or manually download and upload to the server)

git clone https://github.com/postgrespro/rum.git
cd rum

2. Compile and install

make && make install

3. Enable in database

Enter in the psql command line or the sql of the remote management tool

create extension rum;

Guess you like

Origin blog.csdn.net/ziqibit/article/details/133432579