MCPcopy Index your code
hub / github.com/ChuckHend/pg_later

github.com/ChuckHend/pg_later @v0.4.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.4.0 ↗ · + Follow
31 symbols 46 edges 9 files 5 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

pg_later

Execute SQL now and get the results later.

A postgres extension to execute queries asynchronously. Built on pgmq.

Tembo Cloud Try Free

Static Badge PGXN version

Installation

Run with docker

docker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres quay.io/tembo/pglater-pg:latest

If you'd like to build from source, you can follow the instructions in CONTRIBUTING.md.

Using the extension

Initialize the extension's backend:

CREATE EXTENSION pg_later CASCADE;

SELECT pglater.init();

Execute a SQL query now:

select pglater.exec(
  'select * from pg_available_extensions order by name limit 2'
) as job_id;
 job_id 
--------
     1
(1 row)

Come back at some later time, and retrieve the results by providing the job id:

select pglater.fetch_results(1);
 pg_later_results
--------------------
{
  "query": "select * from pg_available_extensions order by name limit 2",
  "job_id": 1,
  "result": [
    {
      "name": "adminpack",
      "comment": "administrative functions for PostgreSQL",
      "default_version": "2.1",
      "installed_version": null
    },
    {
      "name": "amcheck",
      "comment": "functions for verifying relation integrity",
      "default_version": "1.3",
      "installed_version": null
    }
  ],
  "status": "success"
}

Core symbols most depended-on inside this repo

get_pgc_socket_opt
called by 2
src/util.rs
returns_rows
called by 1
src/clf.rs
init_guc
called by 1
src/guc.rs
get_guc
called by 1
src/guc.rs
handle_cstr
called by 1
src/guc.rs
ready
called by 1
src/bgw.rs
exec_job
called by 1
src/bgw.rs
from_env_default
called by 1
src/util.rs

Shape

Function 25
Class 3
Method 2
Enum 1

Languages

Rust100%

Modules by API surface

src/util.rs10 symbols
src/guc.rs4 symbols
src/executor.rs4 symbols
src/bgw.rs4 symbols
src/api.rs3 symbols
tests/integration_test.rs2 symbols
src/lib.rs2 symbols
src/clf.rs2 symbols

Datastores touched

postgresDatabase · 1 repos

For agents

$ claude mcp add pg_later \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page