https://github.com/ametnes/postgresql
PostgreSQL docker container that has multiple extensions built into it.
https://github.com/ametnes/postgresql
ametnes cloud docker kubernetes pgcron pgvector postgresql sql
Last synced: 26 days ago
JSON representation
PostgreSQL docker container that has multiple extensions built into it.
- Host: GitHub
- URL: https://github.com/ametnes/postgresql
- Owner: ametnes
- License: apache-2.0
- Created: 2024-03-28T03:02:53.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T03:50:28.000Z (almost 2 years ago)
- Last Synced: 2024-04-10T05:02:20.351Z (almost 2 years ago)
- Topics: ametnes, cloud, docker, kubernetes, pgcron, pgvector, postgresql, sql
- Language: Dockerfile
- Homepage: https://cloud.ametnes.com/console/signin?callback_id=xiex7aiYo5wa8ooshavae6ik5ShoopieS4So7Aixaejieph6noothaj7nahquageza9wahtaSoo2vaingaed9gu9OoPhee6thi2iu4ThieZohci1waiyohn8eiVat4zah4aiy9saiy5suteiquasah
- Size: 16.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Extended Bitnami package for PostgreSQL
## Description
Follow [Bitnami package for PostgreSQL](https://github.com/bitnami/containers/blob/main/bitnami/postgresql/README.md) README.md
## Enhancements
| Enhancement | Description |
|-------------|-------------|
| pgvector Extension | Vector DB extension enabled for use as a Vector embeddings storage |
| pg_cron Extension | Extension enabled for in database scheduled tasks |
## Usage
1. Run the container
```
docker run -e POSTGRES_PASSWORD=password -p 5432:5432 --rm -it ametnes/postgresql:16-debian-12
```
2. In another terminal, connect to the postgres instance
```
psql -h localhost -p 5432 -U postgres postgres
```
### pgvector
1. Create the extension
```
CREATE EXTENSION vector;
```
2. Create table with vector column
```
CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));
```
3. Insert vector embeddings
```
INSERT INTO items (embedding) VALUES ('[1,2,3]'), ('[4,5,6]');
```
4. Retrieve vector embeddings
```
SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;
```
### pg_cron
TO-Do