赞
踩
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install -y postgresql14-server
sudo /usr/pgsql-14/bin/postgresql-14-setup initdb
systemctl enable postgresql-14
systemctl start postgresql-14
su - postgres
psql
create user doccano with password 'XXX'; //创建角色
create database doccano_db owner doccano; // 创建数据库
grant all privileges on database doccano_db to doccano;
参考官方文档:https://github.com/pgvector/pgvector
sudo yum install pgvector_14
CREATE EXTENSION vector;
CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));
INSERT INTO items (embedding) VALUES ('[1,2,3]'), ('[4,5,6]');
SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。