{"id":15468322,"url":"https://github.com/winebarrel/poslog","last_synced_at":"2026-01-08T06:40:07.855Z","repository":{"id":39622577,"uuid":"497791633","full_name":"winebarrel/poslog","owner":"winebarrel","description":"Parser to extract SQL from postgresql.log","archived":false,"fork":false,"pushed_at":"2024-06-10T23:54:05.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-19T00:14:49.494Z","etag":null,"topics":["golang","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winebarrel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-05-30T04:43:53.000Z","updated_at":"2024-06-10T23:54:08.000Z","dependencies_parsed_at":"2024-05-07T01:39:40.505Z","dependency_job_id":"3d58d394-e1f2-4ec5-b3f6-5314b3cf95b5","html_url":"https://github.com/winebarrel/poslog","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winebarrel%2Fposlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winebarrel%2Fposlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winebarrel%2Fposlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winebarrel%2Fposlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winebarrel","download_url":"https://codeload.github.com/winebarrel/poslog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379383,"owners_count":20767695,"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":["golang","postgresql"],"created_at":"2024-10-02T01:40:42.084Z","updated_at":"2026-01-08T06:40:07.819Z","avatar_url":"https://github.com/winebarrel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# poslog\n\n[![test](https://github.com/winebarrel/poslog/actions/workflows/test.yml/badge.svg)](https://github.com/winebarrel/poslog/actions/workflows/test.yml)\n\nParser to extract SQL from postgresql.log\n\n## Usage\n\n```sh\n% poslog -h\nUsage of poslog:\n  -fill-params\n    \tFill SQL placeholders with parameters\n  -fingerprint\n    \tAdd SQL fingerprint\n  -version\n    \tPrint version and exit\n\n$ cat postgresql.log\n2022-05-30 04:59:41 UTC:10.0.3.147(57382):postgres@postgres:[12768]:LOG:  statement: select now();\n2022-05-30 04:59:46 UTC:10.0.3.147(57382):postgres@postgres:[12768]:LOG:  statement: begin;\n2022-05-30 04:59:48 UTC:10.0.3.147(57382):postgres@postgres:[12768]:LOG:  statement: insert into hello values (1);\n2022-05-30 04:59:50 UTC:10.0.3.147(57382):postgres@postgres:[12768]:LOG:  statement: commit;\n...\n\n$ poslog postgresql.log # or `cat postgresql.log | poslog`\n{\"Timestamp\":\"2022-05-30 04:59:41 UTC\",\"Host\":\"10.0.3.147\",\"Port\":\"57382\",\"User\":\"postgres\",\"Database\":\"postgres\",\"Pid\":\"[12768]\",\"MessageType\":\"LOG\",\"Duration\":\"\",\"Statement\":\" select now();\"}\n{\"Timestamp\":\"2022-05-30 04:59:46 UTC\",\"Host\":\"10.0.3.147\",\"Port\":\"57382\",\"User\":\"postgres\",\"Database\":\"postgres\",\"Pid\":\"[12768]\",\"MessageType\":\"LOG\",\"Duration\":\"\",\"Statement\":\" begin;\"}\n{\"Timestamp\":\"2022-05-30 04:59:48 UTC\",\"Host\":\"10.0.3.147\",\"Port\":\"57382\",\"User\":\"postgres\",\"Database\":\"postgres\",\"Pid\":\"[12768]\",\"MessageType\":\"LOG\",\"Duration\":\"\",\"Statement\":\" insert into hello values (1);\"}\n{\"Timestamp\":\"2022-05-30 04:59:50 UTC\",\"Host\":\"10.0.3.147\",\"Port\":\"57382\",\"User\":\"postgres\",\"Database\":\"postgres\",\"Pid\":\"[12768]\",\"MessageType\":\"LOG\",\"Duration\":\"\",\"Statement\":\" commit;\"}\n...\n\n$ poslog --fingerprint postgresql.log | jq -r '[.FingerprintSHA1, .Fingerprint] | @tsv'\n128bce1cbcd35b4858c753d3afe542d21b05d28f\tselect now();\n61e1fe7963eac26a601afac53cf6b3e63ab73842\tbegin;\n09a59e4f68251a63c367ca5502f5d5959a45dc04\tinsert into hello values(?+);\nba9df5ac4cba4bec768f732948b4ce99b57ddaa3\tcommit;\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinebarrel%2Fposlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinebarrel%2Fposlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinebarrel%2Fposlog/lists"}