pglite_fusion
Embed an SQLite database in your PostgreSQL table
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3540 | pglite_fusion | pglite_fusion | 0.0.5 | TYPE | MIT | Rust |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--sLd-- | No | Yes | Yes | Yes | no | no |
| Relationships | |
|---|---|
| See Also | duckdb_fdw sqlite_fdw prefix semver unit pgpdf md5hash asn1oid |
pgrx=0.16.1, manual updated pgrx by Vonng
Packages
| Type | Repo | Version | PG Major Availability | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EL | PIGSTY | 0.0.5 | 18 17 16 15 14 13 | pglite_fusion_$v | - |
| Debian | PIGSTY | 0.0.5 | 18 17 16 15 14 13 | postgresql-$v-pglite-fusion | - |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 | PG13 |
|---|---|---|---|---|---|---|
el8.x86_64 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
el8.aarch64 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
el9.x86_64 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
el9.aarch64 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
el10.x86_64 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
el10.aarch64 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
d12.x86_64 | MISS | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
d12.aarch64 | MISS | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
d13.x86_64 | MISS | MISS | MISS | MISS | MISS | MISS |
d13.aarch64 | MISS | MISS | MISS | MISS | MISS | MISS |
u22.x86_64 | MISS | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
u22.aarch64 | MISS | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
u24.x86_64 | MISS | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
u24.aarch64 | MISS | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 | PIGSTY 0.0.5 |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
pglite_fusion_18 | 0.0.5 | el8.x86_64 | pigsty | 1.2 MiB | pglite_fusion_18-0.0.5-2PIGSTY.el8.x86_64.rpm |
pglite_fusion_18 | 0.0.5 | el8.aarch64 | pigsty | 1.0 MiB | pglite_fusion_18-0.0.5-2PIGSTY.el8.aarch64.rpm |
pglite_fusion_18 | 0.0.5 | el9.x86_64 | pigsty | 1.3 MiB | pglite_fusion_18-0.0.5-2PIGSTY.el9.x86_64.rpm |
pglite_fusion_18 | 0.0.5 | el9.aarch64 | pigsty | 1.1 MiB | pglite_fusion_18-0.0.5-2PIGSTY.el9.aarch64.rpm |
pglite_fusion_18 | 0.0.5 | el10.x86_64 | pigsty | 1.1 MiB | pglite_fusion_18-0.0.5-2PIGSTY.el10.x86_64.rpm |
pglite_fusion_18 | 0.0.5 | el10.aarch64 | pigsty | 1.0 MiB | pglite_fusion_18-0.0.5-2PIGSTY.el10.aarch64.rpm |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
pglite_fusion_17 | 0.0.5 | el8.x86_64 | pigsty | 1.2 MiB | pglite_fusion_17-0.0.5-2PIGSTY.el8.x86_64.rpm |
pglite_fusion_17 | 0.0.5 | el8.aarch64 | pigsty | 1.0 MiB | pglite_fusion_17-0.0.5-2PIGSTY.el8.aarch64.rpm |
pglite_fusion_17 | 0.0.5 | el9.x86_64 | pigsty | 1.3 MiB | pglite_fusion_17-0.0.5-2PIGSTY.el9.x86_64.rpm |
pglite_fusion_17 | 0.0.5 | el9.aarch64 | pigsty | 1.1 MiB | pglite_fusion_17-0.0.5-2PIGSTY.el9.aarch64.rpm |
pglite_fusion_17 | 0.0.5 | el10.x86_64 | pigsty | 1.1 MiB | pglite_fusion_17-0.0.5-2PIGSTY.el10.x86_64.rpm |
pglite_fusion_17 | 0.0.5 | el10.aarch64 | pigsty | 1.0 MiB | pglite_fusion_17-0.0.5-2PIGSTY.el10.aarch64.rpm |
postgresql-17-pglite-fusion | 0.0.5 | d12.x86_64 | pigsty | 1.1 MiB | postgresql-17-pglite-fusion_0.0.5-1PIGSTY~bookworm_amd64.deb |
postgresql-17-pglite-fusion | 0.0.5 | d12.aarch64 | pigsty | 955.0 KiB | postgresql-17-pglite-fusion_0.0.5-1PIGSTY~bookworm_arm64.deb |
postgresql-17-pglite-fusion | 0.0.5 | u22.x86_64 | pigsty | 1.1 MiB | postgresql-17-pglite-fusion_0.0.5-1PIGSTY~jammy_amd64.deb |
postgresql-17-pglite-fusion | 0.0.5 | u22.aarch64 | pigsty | 1.1 MiB | postgresql-17-pglite-fusion_0.0.5-1PIGSTY~jammy_arm64.deb |
postgresql-17-pglite-fusion | 0.0.5 | u24.x86_64 | pigsty | 1.1 MiB | postgresql-17-pglite-fusion_0.0.5-1PIGSTY~noble_amd64.deb |
postgresql-17-pglite-fusion | 0.0.5 | u24.aarch64 | pigsty | 1.1 MiB | postgresql-17-pglite-fusion_0.0.5-1PIGSTY~noble_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
pglite_fusion_16 | 0.0.5 | el8.x86_64 | pigsty | 1.2 MiB | pglite_fusion_16-0.0.5-2PIGSTY.el8.x86_64.rpm |
pglite_fusion_16 | 0.0.5 | el8.aarch64 | pigsty | 1.0 MiB | pglite_fusion_16-0.0.5-2PIGSTY.el8.aarch64.rpm |
pglite_fusion_16 | 0.0.5 | el9.x86_64 | pigsty | 1.3 MiB | pglite_fusion_16-0.0.5-2PIGSTY.el9.x86_64.rpm |
pglite_fusion_16 | 0.0.5 | el9.aarch64 | pigsty | 1.1 MiB | pglite_fusion_16-0.0.5-2PIGSTY.el9.aarch64.rpm |
pglite_fusion_16 | 0.0.5 | el10.x86_64 | pigsty | 1.1 MiB | pglite_fusion_16-0.0.5-2PIGSTY.el10.x86_64.rpm |
pglite_fusion_16 | 0.0.5 | el10.aarch64 | pigsty | 1.0 MiB | pglite_fusion_16-0.0.5-2PIGSTY.el10.aarch64.rpm |
postgresql-16-pglite-fusion | 0.0.5 | d12.x86_64 | pigsty | 1.1 MiB | postgresql-16-pglite-fusion_0.0.5-1PIGSTY~bookworm_amd64.deb |
postgresql-16-pglite-fusion | 0.0.5 | d12.aarch64 | pigsty | 955.2 KiB | postgresql-16-pglite-fusion_0.0.5-1PIGSTY~bookworm_arm64.deb |
postgresql-16-pglite-fusion | 0.0.5 | u22.x86_64 | pigsty | 1.1 MiB | postgresql-16-pglite-fusion_0.0.5-1PIGSTY~jammy_amd64.deb |
postgresql-16-pglite-fusion | 0.0.5 | u22.aarch64 | pigsty | 1.1 MiB | postgresql-16-pglite-fusion_0.0.5-1PIGSTY~jammy_arm64.deb |
postgresql-16-pglite-fusion | 0.0.5 | u24.x86_64 | pigsty | 1.1 MiB | postgresql-16-pglite-fusion_0.0.5-1PIGSTY~noble_amd64.deb |
postgresql-16-pglite-fusion | 0.0.5 | u24.aarch64 | pigsty | 1.1 MiB | postgresql-16-pglite-fusion_0.0.5-1PIGSTY~noble_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
pglite_fusion_15 | 0.0.5 | el8.x86_64 | pigsty | 1.2 MiB | pglite_fusion_15-0.0.5-2PIGSTY.el8.x86_64.rpm |
pglite_fusion_15 | 0.0.5 | el8.aarch64 | pigsty | 1.0 MiB | pglite_fusion_15-0.0.5-2PIGSTY.el8.aarch64.rpm |
pglite_fusion_15 | 0.0.5 | el9.x86_64 | pigsty | 1.3 MiB | pglite_fusion_15-0.0.5-2PIGSTY.el9.x86_64.rpm |
pglite_fusion_15 | 0.0.5 | el9.aarch64 | pigsty | 1.1 MiB | pglite_fusion_15-0.0.5-2PIGSTY.el9.aarch64.rpm |
pglite_fusion_15 | 0.0.5 | el10.x86_64 | pigsty | 1.1 MiB | pglite_fusion_15-0.0.5-2PIGSTY.el10.x86_64.rpm |
pglite_fusion_15 | 0.0.5 | el10.aarch64 | pigsty | 1.0 MiB | pglite_fusion_15-0.0.5-2PIGSTY.el10.aarch64.rpm |
postgresql-15-pglite-fusion | 0.0.5 | d12.x86_64 | pigsty | 1.1 MiB | postgresql-15-pglite-fusion_0.0.5-1PIGSTY~bookworm_amd64.deb |
postgresql-15-pglite-fusion | 0.0.5 | d12.aarch64 | pigsty | 955.2 KiB | postgresql-15-pglite-fusion_0.0.5-1PIGSTY~bookworm_arm64.deb |
postgresql-15-pglite-fusion | 0.0.5 | u22.x86_64 | pigsty | 1.1 MiB | postgresql-15-pglite-fusion_0.0.5-1PIGSTY~jammy_amd64.deb |
postgresql-15-pglite-fusion | 0.0.5 | u22.aarch64 | pigsty | 1.1 MiB | postgresql-15-pglite-fusion_0.0.5-1PIGSTY~jammy_arm64.deb |
postgresql-15-pglite-fusion | 0.0.5 | u24.x86_64 | pigsty | 1.1 MiB | postgresql-15-pglite-fusion_0.0.5-1PIGSTY~noble_amd64.deb |
postgresql-15-pglite-fusion | 0.0.5 | u24.aarch64 | pigsty | 1.1 MiB | postgresql-15-pglite-fusion_0.0.5-1PIGSTY~noble_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
pglite_fusion_14 | 0.0.5 | el8.x86_64 | pigsty | 1.2 MiB | pglite_fusion_14-0.0.5-2PIGSTY.el8.x86_64.rpm |
pglite_fusion_14 | 0.0.5 | el8.aarch64 | pigsty | 1.0 MiB | pglite_fusion_14-0.0.5-2PIGSTY.el8.aarch64.rpm |
pglite_fusion_14 | 0.0.5 | el9.x86_64 | pigsty | 1.3 MiB | pglite_fusion_14-0.0.5-2PIGSTY.el9.x86_64.rpm |
pglite_fusion_14 | 0.0.5 | el9.aarch64 | pigsty | 1.1 MiB | pglite_fusion_14-0.0.5-2PIGSTY.el9.aarch64.rpm |
pglite_fusion_14 | 0.0.5 | el10.x86_64 | pigsty | 1.1 MiB | pglite_fusion_14-0.0.5-2PIGSTY.el10.x86_64.rpm |
pglite_fusion_14 | 0.0.5 | el10.aarch64 | pigsty | 1.0 MiB | pglite_fusion_14-0.0.5-2PIGSTY.el10.aarch64.rpm |
postgresql-14-pglite-fusion | 0.0.5 | d12.x86_64 | pigsty | 1.1 MiB | postgresql-14-pglite-fusion_0.0.5-1PIGSTY~bookworm_amd64.deb |
postgresql-14-pglite-fusion | 0.0.5 | d12.aarch64 | pigsty | 954.9 KiB | postgresql-14-pglite-fusion_0.0.5-1PIGSTY~bookworm_arm64.deb |
postgresql-14-pglite-fusion | 0.0.5 | u22.x86_64 | pigsty | 1.1 MiB | postgresql-14-pglite-fusion_0.0.5-1PIGSTY~jammy_amd64.deb |
postgresql-14-pglite-fusion | 0.0.5 | u22.aarch64 | pigsty | 1.1 MiB | postgresql-14-pglite-fusion_0.0.5-1PIGSTY~jammy_arm64.deb |
postgresql-14-pglite-fusion | 0.0.5 | u24.x86_64 | pigsty | 1.1 MiB | postgresql-14-pglite-fusion_0.0.5-1PIGSTY~noble_amd64.deb |
postgresql-14-pglite-fusion | 0.0.5 | u24.aarch64 | pigsty | 1.1 MiB | postgresql-14-pglite-fusion_0.0.5-1PIGSTY~noble_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
pglite_fusion_13 | 0.0.5 | el8.x86_64 | pigsty | 1.2 MiB | pglite_fusion_13-0.0.5-2PIGSTY.el8.x86_64.rpm |
pglite_fusion_13 | 0.0.5 | el8.aarch64 | pigsty | 1.0 MiB | pglite_fusion_13-0.0.5-2PIGSTY.el8.aarch64.rpm |
pglite_fusion_13 | 0.0.5 | el9.x86_64 | pigsty | 1.3 MiB | pglite_fusion_13-0.0.5-2PIGSTY.el9.x86_64.rpm |
pglite_fusion_13 | 0.0.5 | el9.aarch64 | pigsty | 1.1 MiB | pglite_fusion_13-0.0.5-2PIGSTY.el9.aarch64.rpm |
pglite_fusion_13 | 0.0.5 | el10.x86_64 | pigsty | 1.1 MiB | pglite_fusion_13-0.0.5-2PIGSTY.el10.x86_64.rpm |
pglite_fusion_13 | 0.0.5 | el10.aarch64 | pigsty | 1.0 MiB | pglite_fusion_13-0.0.5-2PIGSTY.el10.aarch64.rpm |
postgresql-13-pglite-fusion | 0.0.5 | d12.x86_64 | pigsty | 2.0 KiB | postgresql-13-pglite-fusion_0.0.5-1PIGSTY~bookworm_amd64.deb |
postgresql-13-pglite-fusion | 0.0.5 | d12.aarch64 | pigsty | 2.0 KiB | postgresql-13-pglite-fusion_0.0.5-1PIGSTY~bookworm_arm64.deb |
postgresql-13-pglite-fusion | 0.0.5 | u22.x86_64 | pigsty | 1.9 KiB | postgresql-13-pglite-fusion_0.0.5-1PIGSTY~jammy_amd64.deb |
postgresql-13-pglite-fusion | 0.0.5 | u22.aarch64 | pigsty | 2.0 KiB | postgresql-13-pglite-fusion_0.0.5-1PIGSTY~jammy_arm64.deb |
postgresql-13-pglite-fusion | 0.0.5 | u24.x86_64 | pigsty | 2.0 KiB | postgresql-13-pglite-fusion_0.0.5-1PIGSTY~noble_amd64.deb |
postgresql-13-pglite-fusion | 0.0.5 | u24.aarch64 | pigsty | 1.9 KiB | postgresql-13-pglite-fusion_0.0.5-1PIGSTY~noble_arm64.deb |
Source
pig build get pglite_fusion; # get pglite_fusion source code
pig build dep pglite_fusion; # install build dependencies
pig build pkg pglite_fusion; # build extension rpm or deb
pig build ext pglite_fusion; # build extension rpmsInstall
To add the required PGDG / PIGSTY upstream repository, use:
pig repo add pgsql -u # add PGDG + Pigsty repo and update cache (leave existing repos)Install this extension with:
pig ext install pglite_fusion; # install by extension name, for the current active PG version
pig ext install pglite_fusion; # install via package alias, for the active PG version
pig ext install pglite_fusion -v 18; # install for PG 18
pig ext install pglite_fusion -v 17; # install for PG 17
pig ext install pglite_fusion -v 16; # install for PG 16
pig ext install pglite_fusion -v 15; # install for PG 15
pig ext install pglite_fusion -v 14; # install for PG 14
pig ext install pglite_fusion -v 13; # install for PG 13Create this extension with:
CREATE EXTENSION pglite_fusion;Usage
https://github.com/frectonz/pglite-fusion/blob/main/README.md
Here’s some demo usage.
-- Load PG extension
CREATE EXTENSION pglite_fusion;
-- Create a table with an SQLite column
CREATE TABLE people (
name TEXT NOT NULL,
database SQLITE DEFAULT init_sqlite('CREATE TABLE todos (task TEXT)')
);
-- Insert a row into the people table
INSERT INTO people VALUES ('frectonz');
-- Create a todo for "frectonz"
UPDATE people
SET database = execute_sqlite(
database,
'INSERT INTO todos VALUES (''solve multitenancy'')'
)
WHERE name = 'frectonz';
-- Create a todo for "frectonz"
UPDATE people
SET database = execute_sqlite(
database,
'INSERT INTO todos VALUES (''buy milk'')'
)
WHERE name = 'frectonz';
-- Fetch frectonz's info
SELECT
name,
(
SELECT json_agg(get_sqlite_text(sqlite_row, 0))
FROM query_sqlite(
database,
'SELECT * FROM todos'
)
) AS todos
FROM
people
WHERE
name = 'frectonz';API Doc
empty_sqlite
Creates an empty SQLite database and returns it as a binary object. This can be used to initialize an empty SQLite database in a PostgreSQL column.
Example Usage:
SELECT empty_sqlite();query_sqlite
Executes a SQL query on a SQLite database stored as a binary object and returns the result as a table of JSON-encoded rows. This function is useful for querying SQLite databases stored in PostgreSQL columns.
Parameters:
sqlite: The SQLite database to query, stored as a binary object.query: The SQL query string to execute on the SQLite database.
Example Usage:
SELECT * FROM query_sqlite(
database,
'SELECT * FROM todos'
);execute_sqlite
Executes a SQL statement (such as INSERT, UPDATE, or DELETE) on a SQLite database stored as a binary object. The updated SQLite database is returned as a binary object, allowing further operations on it.
Parameters:
sqlite: The SQLite database to execute the SQL query on, stored as a binary object.query: The SQL statement to execute on the SQLite database.
Example Usage:
UPDATE people
SET database = execute_sqlite(
database,
'INSERT INTO todos VALUES (''solve multitenancy'')'
)
WHERE name = 'frectonz';init_sqlite
Creates an SQLite database with an initialization query already applied on it. This can be used to initialize a SQLite database with the expected tables already created.
Parameters:
query: The SQL statement to execute on the SQLite database.
Example Usage:
CREATE TABLE people (
name TEXT NOT NULL,
database SQLITE DEFAULT init_sqlite('CREATE TABLE todos (task TEXT)')
);get_sqlite_text
Extracts a text value from a specific column in a row returned by query_sqlite. Use this function to retrieve text values from query results.
Parameters:
sqlite_row: A row from the results ofquery_sqlite.index: The index of the column to extract from the row.
Example Usage:
SELECT get_sqlite_text(sqlite_row, 0)
FROM query_sqlite(database, 'SELECT * FROM todos');get_sqlite_integer
Extracts an integer value from a specific column in a row returned by query_sqlite. Use this function to retrieve integer values from query results.
Parameters:
sqlite_row: A row from the results ofquery_sqlite.index: The index of the column to extract from the row.
Example Usage:
SELECT get_sqlite_integer(sqlite_row, 1)
FROM query_sqlite(database, 'SELECT * FROM todos');get_sqlite_real
Extracts a real (floating-point) value from a specific column in a row returned by query_sqlite. Use this function to retrieve real number values from query results.
Parameters:
sqlite_row: A row from the results ofquery_sqlite.index: The index of the column to extract from the row.
Example Usage:
SELECT get_sqlite_real(sqlite_row, 2)
FROM query_sqlite(database, 'SELECT * FROM todos');