{"id":13647920,"url":"https://github.com/supabase/postgres-meta","last_synced_at":"2026-04-08T10:02:04.727Z","repository":{"id":37574380,"uuid":"265560320","full_name":"supabase/postgres-meta","owner":"supabase","description":"A RESTful API for managing your Postgres. Fetch tables, add roles, and run queries","archived":false,"fork":false,"pushed_at":"2025-04-02T23:00:20.000Z","size":91268,"stargazers_count":1016,"open_issues_count":57,"forks_count":137,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-03T08:24:26.981Z","etag":null,"topics":["database","postgres","postgresql"],"latest_commit_sha":null,"homepage":"https://supabase.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supabase.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},"funding":{"github":["supabase"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-05-20T12:36:37.000Z","updated_at":"2025-04-01T12:46:56.000Z","dependencies_parsed_at":"2023-10-20T08:41:26.539Z","dependency_job_id":"384fd49c-df96-41d7-8115-2a02912617a7","html_url":"https://github.com/supabase/postgres-meta","commit_stats":{"total_commits":824,"total_committers":38,"mean_commits":21.68421052631579,"dds":0.616504854368932,"last_synced_commit":"383bdf0d0add9e34e5320ac7c1050634b1d55502"},"previous_names":[],"tags_count":220,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgres-meta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgres-meta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgres-meta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgres-meta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase","download_url":"https://codeload.github.com/supabase/postgres-meta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247695145,"owners_count":20980784,"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":["database","postgres","postgresql"],"created_at":"2024-08-02T01:03:50.221Z","updated_at":"2026-04-08T10:02:04.715Z","avatar_url":"https://github.com/supabase.png","language":"TypeScript","funding_links":["https://github.com/sponsors/supabase"],"categories":["TypeScript","database"],"sub_categories":[],"readme":"# `postgres-meta`\n\nA RESTful API for managing your Postgres. Fetch tables, add roles, and run queries (and more).\n\n## Documentation\n\nhttps://supabase.github.io/postgres-meta/\n\n## Progress\n\nSchema:\n\n- [X] `POST /query` (Execute SQL query)\n  - [x] `POST /format` (Format SQL query)\n  - [x] `POST /parse` (Parse SQL query into AST)\n  - [ ] `POST /explain` (Explain SQL query)\n- [X] `/columns`\n  - [X] GET (List)\n  - [X] POST (`alter table add column`)\n  - [X] PATCH (`alter table alter/rename column`)\n  - [X] DELETE (`alter table drop column`)\n- [X] `/extensions`\n  - [X] GET (List)\n  - [X] POST (`create extension`)\n  - [X] PATCH (`alter extension`)\n  - [X] DELETE (`drop extension`)\n- [X] `/functions`\n  - [X] GET (List)\n  - [X] POST (`create function`)\n  - [X] PATCH (`alter function`)\n  - [X] DELETE (`drop function`)\n- [X] `/publications`\n  - [X] GET (List)\n  - [X] POST (`create publication`)\n  - [X] PATCH (`alter publication`)\n  - [X] DELETE (`drop publication`)\n- [X] `/roles`\n  - [X] GET (List)\n  - [X] POST (`create role`)\n  - [X] PATCH (`alter role`)\n  - [X] DELETE (`drop role`)\n- [X] `/schemas`\n  - [X] GET (List)\n  - [X] POST (`create schema`)\n  - [X] PATCH (`alter schema`)\n  - [X] DELETE (`drop schema`)\n- [X] `/tables`\n  - [X] GET (List)\n  - [X] POST (`create table`)\n  - [X] PATCH (`alter table`)\n  - [X] DELETE (`drop table`)\n- [X] `/triggers`\n  - [X] GET (List)\n  - [X] POST (`create trigger`)\n  - [X] PATCH (`alter trigger`)\n  - [X] DELETE (`drop trigger`)\n- [ ] `/types`\n  - [X] GET (List)\n  - [ ] POST (`create type`)\n  - [ ] PATCH (`alter type`)\n  - [ ] DELETE (`drop type`)\n\nHelpers:\n\n- [ ] `/config`\n  - [ ] GET `/version`: Postgres version \n- [ ] `/generators`\n  - [ ] GET `/openapi`: Generate Open API \n  - [ ] GET `/typescript`: Generate Typescript types\n  - [ ] GET `/swift`: Generate Swift types (beta)\n  - [ ] GET `/python`: Generate Python types (beta)\n\n## Quickstart\n\nSet the following ENV VARS:\n\n```bash\nPG_META_HOST=\"0.0.0.0\"\nPG_META_PORT=8080\nPG_META_DB_HOST=\"postgres\"\nPG_META_DB_NAME=\"postgres\"\nPG_META_DB_USER=\"postgres\"\nPG_META_DB_PORT=5432\nPG_META_DB_PASSWORD=\"postgres\"\n```\n\nThen run any of the binaries in the releases.\n\n\n## FAQs\n\n**Why?**\n\nThis serves as a light-weight connection pooler. It also normalises the Postgres system catalog into a more readable format. While there is a lot of re-inventing right now, this server will eventually provide helpers (such as type generators). The server is multi-tenant, so it can support multiple Postgres databases from a single server.\n\n**What security does this use?**\n\nNone. Please don't use this as a standalone server. This should be used behind a proxy in a trusted environment, on your local machine, or using this internally with no access to the outside world. \n\n## Developers\n\nTo start developing, run `npm run dev`. It will set up the database with Docker for you. The server will restart on file change.\n\nIf you are fixing a bug, you should create a new test case. To test your changes, add the `-u` flag to `vitest` on the `test:run` script, run `npm run test`, and then review the git diff of the snapshots. Depending on your change, you may see `id` fields being changed - this is expected and you are free to commit it, as long as it passes the CI. Don't forget to remove the `-u` flag when committing.\n\nTo make changes to the type generation, run `npm run gen:types:\u003clang\u003e` while you have `npm run dev` running,\nwhere `\u003clang\u003e` is one of:\n\n- `typescript`\n- `go`\n- `swift` (beta)\n- `python` (beta)\n\nTo use your own database connection string instead of the provided test database, run:\n`PG_META_DB_URL=postgresql://postgres:postgres@localhost:5432/postgres npm run gen:types:\u003clang\u003e`\n\n## Licence\n\nApache 2.0\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fpostgres-meta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase%2Fpostgres-meta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fpostgres-meta/lists"}