{"id":13647667,"url":"https://github.com/tembo-io/pg_later","last_synced_at":"2025-04-09T11:08:33.099Z","repository":{"id":183497649,"uuid":"670229593","full_name":"tembo-io/pg_later","owner":"tembo-io","description":"Execute SQL now and get the results later.","archived":false,"fork":false,"pushed_at":"2024-12-17T14:23:48.000Z","size":206,"stargazers_count":366,"open_issues_count":12,"forks_count":12,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-02T10:09:44.473Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"postgresql","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tembo-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-24T15:17:35.000Z","updated_at":"2025-03-24T09:12:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"cbe0012c-ba51-4047-94dc-03aaccca6b5a","html_url":"https://github.com/tembo-io/pg_later","commit_stats":null,"previous_names":["tembo-io/pg_later"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tembo-io%2Fpg_later","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tembo-io%2Fpg_later/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tembo-io%2Fpg_later/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tembo-io%2Fpg_later/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tembo-io","download_url":"https://codeload.github.com/tembo-io/pg_later/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027407,"owners_count":21035594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:03:41.928Z","updated_at":"2025-04-09T11:08:33.081Z","avatar_url":"https://github.com/tembo-io.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg_later\n\nExecute SQL now and get the results later.\n\nA postgres extension to execute queries asynchronously. Built on [pgmq](https://github.com/tembo-io/pgmq).\n\n[![Tembo Cloud Try Free](https://tembo.io/tryFreeButton.svg)](https://cloud.tembo.io/sign-up)\n\n[![Static Badge](https://img.shields.io/badge/%40tembo-community?logo=slack\u0026label=slack)](https://join.slack.com/t/tembocommunity/shared_invite/zt-20dtnhcmo-pLNV7_Aobi50TdTLpfQ~EQ)\n[![PGXN version](https://badge.fury.io/pg/pg_later.svg)](https://pgxn.org/dist/pg_later/)\n\n## Installation\n\n### Run with docker\n\n```bash\ndocker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres quay.io/tembo/pglater-pg:latest\n```\n\nIf you'd like to build from source, you can follow the instructions in [CONTRIBUTING.md](https://github.com/tembo-io/pg_later/blob/main/CONTRIBUTING.md).\n\n### Using the extension\n\nInitialize the extension's backend:\n\n```sql\nCREATE EXTENSION pg_later CASCADE;\n\nSELECT pglater.init();\n```\n\nExecute a SQL query now:\n\n```sql\nselect pglater.exec(\n  'select * from pg_available_extensions order by name limit 2'\n) as job_id;\n```\n\n```text\n job_id \n--------\n     1\n(1 row)\n```\n\nCome back at some later time, and retrieve the results by providing the job id:\n\n```sql\nselect pglater.fetch_results(1);\n```\n\n```text\n pg_later_results\n--------------------\n{\n  \"query\": \"select * from pg_available_extensions order by name limit 2\",\n  \"job_id\": 1,\n  \"result\": [\n    {\n      \"name\": \"adminpack\",\n      \"comment\": \"administrative functions for PostgreSQL\",\n      \"default_version\": \"2.1\",\n      \"installed_version\": null\n    },\n    {\n      \"name\": \"amcheck\",\n      \"comment\": \"functions for verifying relation integrity\",\n      \"default_version\": \"1.3\",\n      \"installed_version\": null\n    }\n  ],\n  \"status\": \"success\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftembo-io%2Fpg_later","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftembo-io%2Fpg_later","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftembo-io%2Fpg_later/lists"}