GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pgvector/pgvector-cobol: pgvector examples for COBOL

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.gitignore
.gitignore
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
example.cbl
example.cbl
 
 

Repository files navigation

pgvector-cobol

pgvector examples for COBOL

Supports Open Cobol ESQL

Build Status

Getting Started

Follow the instructions for your database library:

  • Open Cobol ESQL

Open Cobol ESQL

Enable the extension

EXEC SQL
    CREATE EXTENSION IF NOT EXISTS vector
END-EXEC.

Create a table

EXEC SQL
    CREATE TABLE items (
        id bigserial PRIMARY KEY,
        embedding vector(3)
    )
END-EXEC.

Insert vectors

MOVE "[1,2,3]" TO EMBEDDING.
MOVE "[4,5,6]" TO EMBEDDING2.
EXEC SQL
    INSERT INTO items (embedding)
        VALUES (:EMBEDDING), (:EMBEDDING2)
END-EXEC.

Get the nearest neighbor

MOVE "[3,1,2]" TO EMBEDDING.
EXEC SQL
    SELECT id INTO :NEAREST-ID FROM items
        ORDER BY embedding <-> :EMBEDDING LIMIT 5
END-EXEC.

See a full example

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

  • Report bugs
  • Fix bugs and submit pull requests
  • Write, clarify, or fix documentation
  • Suggest or add new features

To get started with development:

git clone https://github.com/pgvector/pgvector-cobol.git
cd pgvector-cobol
createdb pgvector_cobol_test
ocesql example.cbl example.cob
export COBCPY=path/to/Open-COBOL-ESQL/copy
cobc -x -locesql example.cob
./example

About

pgvector examples for COBOL

Resources

Readme
MIT license

Security policy

Security policy
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.