Skip to content

Commit 07eed93

Browse files
committed
Add CN and EN documents for new extensions pgroonga ddlx
and pgrouting, correct pgvector version information
1 parent 2baacff commit 07eed93

File tree

10 files changed

+417
-3
lines changed

10 files changed

+417
-3
lines changed

CN/modules/ROOT/nav.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
* IvorySQL生态
1313
** xref:v1.17/9.adoc[PostGIS]
1414
** xref:v1.17/10.adoc[pgvector]
15+
** xref:v1.17/34.adoc[PGroonga]
16+
** xref:v1.17/35.adoc[pgddl (DDL Extractor)]
17+
** xref:v1.17/36.adoc[pgRouting]
1518
* Oracle兼容功能列表
1619
** xref:v1.17/11.adoc[1、Ivorysql框架设计]
1720
** xref:v1.17/12.adoc[2、GUC框架]
@@ -24,4 +27,4 @@
2427
** xref:v1.17/19.adoc[9、新增Oracle兼容模式的端口与IP]
2528
* xref:v1.17/20.adoc[社区贡献指南]
2629
* xref:v1.17/21.adoc[工具参考]
27-
* xref:v1.17/22.adoc[FAQ]
30+
* xref:v1.17/22.adoc[FAQ]

CN/modules/ROOT/pages/v1.17/10.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export PG_CONFIG=/usr/local/ivorysql/ivorysql-1.17/bin/pg_config
3131

3232
** 拉取pg_vector源码
3333
```
34-
git clone --branch v0.6.2 https://github.com/pgvector/pgvector.git
34+
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git
3535
```
3636

3737
** 安装 pgvector
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
2+
:sectnums:
3+
:sectnumlevels: 5
4+
5+
= PGroonga
6+
7+
== 概述
8+
PostgreSQL 内置了全文搜索功能,但在处理​​大规模数据​​、​​复杂查询​​以及​​非英语语言(特别是中日韩等 CJK 语言)​​ 时,其功能和性能可能无法满足高性能应用的需求。
9+
10+
PGroonga 应运而生,它是一个 PostgreSQL 的扩展插件,将 ​​Groonga​​ 这款高性能的全功能全文搜索引擎与 PostgreSQL 数据库深度融合。Groonga 本身是一个优秀的开源搜索引擎,以其极致的速度和丰富的功能著称,尤其擅长处理多语言文本。PGroonga 的使命就是将 Groonga 的强大能力无缝地带入 PostgreSQL 的世界,为用户提供远超原生全文搜索的体验。
11+
12+
== 安装
13+
根据开发环境,用户可从 https://pgroonga.github.io/install[PGroonga安装] 页面选择适合自己的方式进行PGroonga安装。
14+
IvorySQL的安装包里已经集成了PGroonga插件,如果使用安装包安装的IvorySQL,通常不需要再手动安装PGroonga即可使用。
15+
16+
=== 源码安装
17+
除PGroonga社区提供的安装方式以外,IvorySQL社区也提供了源码安装方式,源码安装环境为 Ubuntu 24.04(x86_64)。
18+
19+
[TIP]
20+
环境中已经安装了IvorySQL4.6及以上版本,安装路径为/usr/local/ivorysql/ivorysql-4
21+
22+
==== 安装 groonga
23+
24+
** 安装依赖 kytea
25+
```
26+
git clone https://github.com/neubig/kytea.git
27+
autoreconf -i
28+
./configure
29+
make
30+
sudo make install
31+
```
32+
33+
** 安装依赖 libzmq
34+
```
35+
从https://github.com/zeromq/libzmq/releases/tag/v4.3.5 下载zeromq-4.3.5.tar.gz
36+
tar xvf zeromq-4.3.5.tar.gz
37+
cd zeromq-4.3.5/
38+
./configure
39+
make
40+
sudo make install
41+
```
42+
43+
** 下载 groonga包,安装指定依赖
44+
```
45+
wget https://packages.groonga.org/source/groonga/groonga-latest.tar.gz
46+
tar xvf groonga-15.1.5.tar.gz
47+
cd groonga-15.1.5
48+
#运行这个脚本安装依赖,支持apt和dnf包管理工具
49+
./ setup.sh
50+
```
51+
52+
** 编译安装
53+
```
54+
# -S 指定groonga源码目录, -B 指定build目录,这个目录是个源码目录之外的一个只用于build的目录
55+
cmake -S /home/ivorysql/groonga-15.1.5 -B /home/ivorysql/groonga_build --preset=release-maximum
56+
cmake --build /home/ivorysql/groonga_build
57+
sudo cmake --install /home/ivorysql/groonga_build
58+
# 更新动态链接库缓存
59+
sudo ldconfig
60+
```
61+
62+
** 验证 groonga安装成功
63+
```
64+
$ groonga --version
65+
Groonga 15.1.5 [Linux,x86_64,utf8,match-escalation-threshold=0,nfkc,mecab,message-pack,mruby,onigmo,zlib,lz4,zstandard,epoll,apache-arrow,xxhash,blosc,bfloat16,h3,simdjson,llama.cpp]
66+
```
67+
68+
==== 安装 pgroonga
69+
```
70+
wget https://packages.groonga.org/source/pgroonga/pgroonga-4.0.1.tar.gz
71+
tar xvf pgroonga-4.0.1.tar.gz
72+
cd pgroonga-4.0.1
73+
```
74+
75+
编译PGroonga,有个选项:HAVE_MSGPACK=1,它是用于支持WAL,使用这个选项需要安装msgpack-c 1.4.1或者更高版本。在基于Debian的平台使用libmsgpack-dev包,在CentOS 7上用msgpack-devel
76+
```
77+
#安装依赖
78+
sudo apt install libmsgpack-dev
79+
```
80+
81+
运行make前确保pg_config命令的路径在PATH环境变量里
82+
```
83+
make HAVE_MSGPACK=1
84+
make install
85+
```
86+
87+
== 创建Extension并确认PGroonga版本
88+
89+
psql 连接到数据库,执行如下命令:
90+
```
91+
ivorysql=# CREATE extension pgroonga;
92+
CREATE EXTENSION
93+
94+
ivorysql=# SELECT * FROM pg_available_extensions WHERE name = 'pgroonga';
95+
name | default_version | installed_version | comment
96+
---------+-----------------+-------------------+-------------------------------------------------------------------------------
97+
pgroonga| 4.0.1 | 4.0.1 | Super fast and all languages supported full text search index based on Groonga
98+
(1 row)
99+
```
100+
101+
== 使用
102+
关于PGroonga的使用,请参阅 https://pgroonga.github.io/tutorial[PGroonga官方文档]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
:sectnums:
3+
:sectnumlevels: 5
4+
5+
= pgddl (DDL Extractor)
6+
7+
== 概述
8+
pgddl 是一个专为 PostgreSQL 数据库设计的 SQL 函数扩展,它能够直接从数据库系统目录中生成清晰、格式化的 SQL DDL (数据定义语言) 脚本,例如 CREATE TABLE 或 ALTER FUNCTION。它解决了 PostgreSQL 原生缺乏类似 SHOW CREATE TABLE 命令的问题,让用户无需借助外部工具(如 pg_dump)即可在纯 SQL 环境中轻松获取对象的创建语句。
9+
10+
该扩展通过一组简单的 SQL 函数提供了一套完整的解决方案,其优势包括:仅需使用 SQL 查询即可操作、支持通过 WHERE 子句灵活筛选对象、并能智能处理对象之间的依赖关系,生成包含 Drop 和 Create 步骤的完整脚本。这使得它特别适用于数据库变更管理、升级脚本编写和结构审计等场景。
11+
12+
需要注意的是,ddlx 仍在发展中,可能尚未覆盖所有 PostgreSQL 对象类型和高级选项。生成的脚本建议始终在非生产环境中先行检查和测试,以确保其正确性与安全性。
13+
14+
== 安装
15+
IvorySQL的安装包里已经集成了pgddl插件,如果使用安装包安装的IvorySQL,通常不需要再手动安装pgddl即可使用。其它安装方式可以参考下面的源码安装步骤。
16+
17+
[TIP]
18+
环境中已经安装了IvorySQL4.6及以上版本,安装路径为/usr/local/ivorysql/ivorysql-4
19+
20+
=== 源码安装
21+
从https://github.com/lacanoid/pgddl/releases/tag/0.20 下载pgddl-0.20.tar.gz,解压缩。
22+
23+
```
24+
cd pgddl-0.20
25+
# 设置PG_CONFIG环境变量值为pg_config路径,eg:/usr/local/ivorysql/ivorysql-4/bin/pg_config
26+
make PG_CONFIG=/path/to/pg_config
27+
make PG_CONFIG=/path/to/pg_config install
28+
```
29+
30+
== 创建Extension并确认ddlx版本
31+
32+
psql 连接到数据库,执行如下命令:
33+
```
34+
ivorysql=# CREATE extension ddlx;
35+
CREATE EXTENSION
36+
37+
ivorysql=# SELECT * FROM pg_available_extensions WHERE name = 'ddlx';
38+
name | default_version | installed_version | comment
39+
------+-----------------+-------------------+-------------------------
40+
ddlx | 0.20 | 0.20 | DDL eXtractor functions
41+
(1 row)
42+
```
43+
44+
== 使用
45+
关于pgddl的使用,请参阅 https://github.com/lacanoid/pgddl[ddlx官方文档]
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
2+
:sectnums:
3+
:sectnumlevels: 5
4+
5+
= pgRouting
6+
7+
== 概述
8+
pgRouting 是一个基于 PostgreSQL/PostGIS 数据库构建的开源地理空间路由扩展库。它为数据库赋予了强大的网络分析功能,使其能够处理复杂的路径规划与图论计算问题,例如计算两点之间的最短路径、执行旅行推销员(TSP)分析或计算服务区范围等。它将路由算法直接嵌入到数据库中,从而避免了在应用层进行复杂的数据传输与计算。
9+
10+
该扩展的核心优势在于能够利用 PostgreSQL 强大的数据管理能力和 PostGIS 丰富的空间函数,直接在数据库内部对空间网络数据执行高效计算。这不仅简化了应用程序的开发流程,还通过减少数据移动大幅提升了大规模网络分析的性能。
11+
12+
pgRouting 广泛应用于物流配送、交通导航、网络分析、城市规划及供应链管理等多个领域。其开源特性吸引了全球开发者持续的贡献与完善,使其成为空间数据库领域进行路径分析和网络求解的首选工具之一。
13+
14+
== 安装
15+
IvorySQL的安装包里已经集成了pgRouting插件,如果使用安装包安装的IvorySQL,通常不需要再手动安装pgRouting即可使用。其它安装方式可以参考下面的源码安装步骤。
16+
17+
[TIP]
18+
环境中已经安装了IvorySQL4.6及以上版本,安装路径为/usr/local/ivorysql/ivorysql-4
19+
20+
=== 源码安装
21+
22+
** 安装依赖
23+
24+
对perl有依赖,perl一般在装IvorySQL时已经装上了,这里不用再装。
25+
CMake版本要求 >= 3.12, Boost版本 >= 1.56
26+
```
27+
#安装依赖
28+
sudo apt install cmake libboost-all-dev
29+
```
30+
31+
** 编译安装
32+
```
33+
wget https://github.com/pgRouting/pgrouting/releases/download/v3.5.1/pgrouting-3.5.1.tar.gz
34+
tar xvf pgrouting-3.5.1.tar.gz
35+
cd pgrouting-3.5.1
36+
mkdir build
37+
cd build
38+
cmake .. -DPOSTGRESQL_PG_CONFIG=/path/to/pg_config # eg: /usr/local/ivorysql/ivorysql-4/bin/pg_config
39+
make
40+
sudo make install
41+
```
42+
43+
== 创建Extension并确认ddlx版本
44+
45+
psql 连接到数据库,执行如下命令:
46+
```
47+
ivorysql=# CREATE extension pgrouting;
48+
CREATE EXTENSION
49+
50+
ivorysql=# SELECT * FROM pg_available_extensions WHERE name = 'pgrouting';
51+
name | default_version | installed_version | comment
52+
-----------+-----------------+-------------------+---------------------
53+
pgrouting | 3.5.1 | | pgRouting Extension
54+
(1 row)
55+
```
56+
57+
== 使用
58+
关于pgRouting的使用,请参阅 https://docs.pgrouting.org/[pgRouting官方文档]

EN/modules/ROOT/nav.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
* IvorySQL Ecosystem
1313
** xref:v1.17/9.adoc[PostGIS]
1414
** xref:v1.17/10.adoc[pgvector]
15+
** xref:v1.17/34.adoc[PGroonga]
16+
** xref:v1.17/35.adoc[pgddl (DDL Extractor)]
17+
** xref:v1.17/36.adoc[pgRouting]
1518
* List of Oracle compatible features
1619
** xref:v1.17/11.adoc[1、Ivorysql frame design]
1720
** xref:v1.17/12.adoc[2、GUC Framework]

EN/modules/ROOT/pages/v1.17/10.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export PG_CONFIG=/usr/local/ivorysql/ivorysql-4/bin/pg_config
3838

3939
** Pull pg_vector source code
4040
```
41-
git clone --branch v0.6.2 https://github.com/pgvector/pgvector.git
41+
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git
4242
```
4343

4444
** Install pgvector
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
:sectnums:
2+
:sectnumlevels: 5
3+
4+
= PGroonga
5+
6+
== Overview
7+
PostgreSQL has built-in full-text search functionality, but when dealing with large-scale data, complex queries, and non-English languages (especially CJK languages like Chinese, Japanese, and Korean), its functionality and performance may not meet the requirements of high-performance applications.
8+
9+
PGroonga was created to address this need. It is a PostgreSQL extension that deeply integrates Groonga, a high-performance full-featured full-text search engine, with the PostgreSQL database. Groonga itself is an excellent open-source search engine, renowned for its extreme speed and rich functionality, particularly excelling at handling multilingual text. PGroonga's mission is to seamlessly bring Groonga's powerful capabilities into the PostgreSQL world, providing users with an experience that far exceeds native full-text search.
10+
11+
== Installation
12+
13+
Based on the development environment, users can choose the appropriate installation method for PGroonga from the https://pgroonga.github.io/install[PGroonga Installation] page.
14+
15+
[NOTE]
16+
PGroonga plugin is already integrated in the IvorySQL installation package. If you use the installation package to install IvorySQL, you typically do not need to manually install PGroonga and can use it directly.
17+
18+
=== Source Installation
19+
In addition to the installation methods provided by the PGroonga community, the IvorySQL community also provides source installation methods. The source installation environment is Ubuntu 24.04 (x86_64).
20+
21+
[TIP]
22+
IvorySQL 4.6 or higher version is already installed in the environment, with the installation path at /usr/local/ivorysql/ivorysql-4
23+
24+
==== Install groonga
25+
26+
** Install dependency kytea
27+
```
28+
git clone https://github.com/neubig/kytea.git
29+
autoreconf -i
30+
./configure
31+
make
32+
sudo make install
33+
```
34+
35+
** Install dependency libzmq
36+
```
37+
Download zeromq-4.3.5.tar.gz from https://github.com/zeromq/libzmq/releases/tag/v4.3.5
38+
tar xvf zeromq-4.3.5.tar.gz
39+
cd zeromq-4.3.5/
40+
./configure
41+
make
42+
sudo make install
43+
```
44+
45+
** Download groonga package and install specified dependencies
46+
```
47+
wget https://packages.groonga.org/source/groonga/groonga-latest.tar.gz
48+
tar xvf groonga-15.1.5.tar.gz
49+
cd groonga-15.1.5
50+
# Run this script to install dependencies, supporting apt and dnf package managers
51+
./ setup.sh
52+
```
53+
54+
** Compile and install
55+
```
56+
# -S specifies the groonga source directory, -B specifies the build directory, which is a directory outside the source directory used only for building
57+
cmake -S /home/ivorysql/groonga-15.1.5 -B /home/ivorysql/groonga_build --preset=release-maximum
58+
cmake --build /home/ivorysql/groonga_build
59+
sudo cmake --install /home/ivorysql/groonga_build
60+
# Update dynamic library cache
61+
sudo ldconfig
62+
```
63+
64+
** Verify groonga installation success
65+
```
66+
$ groonga --version
67+
Groonga 15.1.5 [Linux,x86_64,utf8,match-escalation-threshold=0,nfkc,mecab,message-pack,mruby,onigmo,zlib,lz4,zstandard,epoll,apache-arrow,xxhash,blosc,bfloat16,h3,simdjson,llama.cpp]
68+
```
69+
70+
==== Install pgroonga
71+
```
72+
wget https://packages.groonga.org/source/pgroonga/pgroonga-4.0.1.tar.gz
73+
tar xvf pgroonga-4.0.1.tar.gz
74+
cd pgroonga-4.0.1
75+
```
76+
77+
When compiling PGroonga, there is an option: HAVE_MSGPACK=1, which is used to support WAL. Using this option requires installing msgpack-c 1.4.1 or higher. On Debian-based platforms, use the libmsgpack-dev package, and on CentOS 7, use msgpack-devel.
78+
```
79+
# Install dependencies
80+
sudo apt install libmsgpack-dev
81+
```
82+
83+
Before running make, ensure that the path of the pg_config command is in the PATH environment variable.
84+
```
85+
make HAVE_MSGPACK=1
86+
make install
87+
```
88+
89+
== Create Extension and Confirm PGroonga Version
90+
91+
Connect to the database with psql and execute the following commands:
92+
```
93+
ivorysql=# CREATE extension pgroonga;
94+
CREATE EXTENSION
95+
96+
ivorysql=# SELECT * FROM pg_available_extensions WHERE name = 'pgroonga';
97+
name | default_version | installed_version | comment
98+
---------+-----------------+-------------------+-------------------------------------------------------------------------------
99+
pgroonga| 4.0.1 | 4.0.1 | Super fast and all languages supported full text search index based on Groonga
100+
(1 row)
101+
```
102+
103+
== Usage
104+
For PGroonga usage, please refer to the https://pgroonga.github.io/tutorial[PGroonga Official Documentation]

0 commit comments

Comments
 (0)