floatvec
Math for vectors (arrays) of numbers
floatvec : Math for vectors (arrays) of numbers
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | intarray arraymath aggs_for_vecs aggs_for_arrays |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.1.1 |
18 17 16 15 14 | floatvec |
- |
| RPM | PIGSTY | 1.1.1 |
18 17 16 15 14 | floatvec_$v |
- |
| DEB | PIGSTY | 1.1.1 |
18 17 16 15 14 | postgresql-$v-floatvec |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| el8.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| el9.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| el9.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| el10.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| el10.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| d12.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| d12.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| d13.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| d13.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u22.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u22.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u24.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u24.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u26.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u26.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
Source
github.com/pjungwir/floatvec
floatvec-1.1.1.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
floatvec: element-by-element arithmetic on PostgreSQL arrays
Provides basic arithmetic functions for operating on arrays treated as vectors. Supports SMALLINT, INTEGER, BIGINT, REAL, and DOUBLE PRECISION.
Functions
Each function accepts two arrays of the same length, or an array and a scalar, or a scalar and an array. Both arguments must be of the same type.
| Function | Description |
|---|---|
vec_add(a, b) |
Element-by-element addition |
vec_sub(a, b) |
Element-by-element subtraction |
vec_mul(a, b) |
Element-by-element multiplication |
vec_div(a, b) |
Element-by-element division |
vec_pow(a, b) |
Element-by-element exponentiation |