HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
frectonz
pglite-fusion
Nix2024–2025
frectonz / pglite-fusion

pglite-fusion

Embed an SQLite database in your PostgreSQL table. AKA multitenancy has been solved.

4Distinct people
5Mentions
0Explicit recommenders
833GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Embed an SQLite database in your PostgreSQL table. AKA multitenancy has been solved.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week5 dated mentions

Observed mentions: 2024-11-18 02:19:44 UTC to 2025-01-04 17:21:41 UTC. Weeks start Monday, UTC.

012342024-11-18 00:00:00 UTC to 2024-11-25 00:00:00 UTC (exclusive): 4 mentions; 4 submissions, 0 commentsNov 182024-11-25 00:00:00 UTC to 2024-12-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-12-02 00:00:00 UTC to 2024-12-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-12-09 00:00:00 UTC to 2024-12-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsDec 92024-12-16 00:00:00 UTC to 2024-12-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-12-23 00:00:00 UTC to 2024-12-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-12-30 00:00:00 UTC to 2025-01-06 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 30

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Nov 182024-11-18 00:00:00 UTC2024-11-25 00:00:00 UTC440
Nov 252024-11-25 00:00:00 UTC2024-12-02 00:00:00 UTC000
Dec 22024-12-02 00:00:00 UTC2024-12-09 00:00:00 UTC000
Dec 92024-12-09 00:00:00 UTC2024-12-16 00:00:00 UTC000
Dec 162024-12-16 00:00:00 UTC2024-12-23 00:00:00 UTC000
Dec 232024-12-23 00:00:00 UTC2024-12-30 00:00:00 UTC000
Dec 302024-12-30 00:00:00 UTC2025-01-06 00:00:00 UTC101

What Hacker News says

5 sources
The performance while querying sqlite objects with sqlite_query() is identical to that of using an in-memory sqlite database. once Postgres 18 is released which contains some specific optimizations around expanded datum lifecycles there will be further improvements to sqlite_exec's behavior. For Postgres < 18 sqlite_exec() will incur a flatten/expand cycle, but this can be worked around in most cases by bundling SQL into a single sqlite_exec call instead of multiple ones. Once Postgres 18 is released this will no longer be an issue. This work is the result of a fairly long running discussion thread [1] on the pgsql-hackers mailing list around improving expanded datum handling for non-array types in general so that one of my other extensions, OneSparse, can take advantage of them. We discussed adding a "skeleton" expanded example into the
Read the rest
Postgres test modules, but it wouldn't be useful. As I generally prefer to make useful things, I took a page from the ideas in pglite-fusion [2] and made it a true first class expanded datum which requires no server filesystem access. [1] https://www.postgresql.org/message-id/flat/CACxu%3DvKMWjj%2B... [2] https://github.com/frectonz/pglite-fusion
In Show HN: Postgres-SQLite: SQLite as first-class types in Postgres
frectonz·Nov 19, 2024Submission

Show HN: Embed an SQLite database in your PostgreSQL table

pglite-fusion is a PostgreSQL extension that allows you to embed SQLite databases into your PostgreSQL tables by enabling the creation of columns with the `SQLITE` type. This means every row in the table can have an embedded SQLite database. In addition to the PostgreSQL `SQLITE` type, pglite-fusion provides the `query_sqlite`` function for querying SQLite databases and the `execute_sqlite` function for updating them. Additional functions are listed in the project’s README. The pglite-fusion extension is written in Rust using the pgrx framework [1]. ---- Implementation Details The PostgreSQL `SQLITE` type is stored as a CBOR-encoded `Vec<u8>`. When a query is made, this `Vec<u8>` is written to a random file in the `/tmp` directory. SQLite then loads the file, performs the query, and returns the result as a table containing a single row wi
Read the rest
th an array of JSON-encoded values. The `execute_sqlite` function follows a similar process. However, instead of returning query results, it returns the contents of the SQLite file (stored in `/tmp`) as a new `SQLITE` instance. [1] https://github.com/pgcentralfoundation/pgrx
180 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.