{"id":15588182,"url":"https://github.com/qbart/pg-misc","last_synced_at":"2026-01-30T11:18:57.126Z","repository":{"id":146380690,"uuid":"186172485","full_name":"qbart/pg-misc","owner":"qbart","description":"Miscellaneous stuff for PostgreSQL like custom functions, aggregates etc.","archived":false,"fork":false,"pushed_at":"2019-05-11T22:26:28.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T14:48:43.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qbart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-11T19:14:34.000Z","updated_at":"2019-06-15T23:18:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"6acd0fc6-c6cf-4ba5-8bf6-f64db2263e1d","html_url":"https://github.com/qbart/pg-misc","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"3c5f655e8516f997ff44c27fb51e6daf9b11867e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qbart/pg-misc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Fpg-misc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Fpg-misc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Fpg-misc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Fpg-misc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qbart","download_url":"https://codeload.github.com/qbart/pg-misc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Fpg-misc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28911821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T08:15:08.179Z","status":"ssl_error","status_checked_at":"2026-01-30T08:14:31.507Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-02T22:21:46.037Z","updated_at":"2026-01-30T11:18:57.091Z","avatar_url":"https://github.com/qbart.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg-miscs\nMiscellaneous stuff for PostgreSQL like custom functions, aggregates etc.\n\n## interval\n\n```sql\nSELECT seconds('1 day'::interval); \n```\n| bigint |\n| - | \n| 86400 |\n\n\n## timestamp\n\n```sql\nSELECT now_utc();  \n```\n| timestamp without time zone |\n| - | \n| 2019-05-11 19:52:33.840088 |\n\n\n## jsonb\n\n```sql\nSELECT\n  tags.group_id,\n  jsonb_count(tags.val)\nFROM (\n\tVALUES\n\t\t(1, 'a'),\n\t\t(1, 'a'),\n\t\t(1, 'b'),\n\t\t(1, 'c'),\n\t\t(2, 'a'),\n\t\t(2, 'b'),\n\t\t(2, null)\n\t) AS tags(group_id, val)\nGROUP BY tags.group_id;\n```\n| integer | jsonb |\n| - | - |\n| 1 | {\"a\": 2, \"b\": 1, \"c\": 1} |\n| 2 | {\"a\": 1, \"b\": 1} |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbart%2Fpg-misc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqbart%2Fpg-misc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbart%2Fpg-misc/lists"}