{"id":37150120,"url":"https://github.com/nrnrk/psql-splitter","last_synced_at":"2026-01-14T17:43:48.462Z","repository":{"id":53082745,"uuid":"198087781","full_name":"nrnrk/psql-splitter","owner":"nrnrk","description":"Split a postgres sql file into multiple files","archived":false,"fork":false,"pushed_at":"2021-04-20T14:40:16.000Z","size":7705,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-21T03:12:54.809Z","etag":null,"topics":["golang","postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nrnrk.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}},"created_at":"2019-07-21T17:50:54.000Z","updated_at":"2021-02-12T14:02:16.000Z","dependencies_parsed_at":"2022-09-12T11:12:51.844Z","dependency_job_id":null,"html_url":"https://github.com/nrnrk/psql-splitter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nrnrk/psql-splitter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrnrk%2Fpsql-splitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrnrk%2Fpsql-splitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrnrk%2Fpsql-splitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrnrk%2Fpsql-splitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nrnrk","download_url":"https://codeload.github.com/nrnrk/psql-splitter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrnrk%2Fpsql-splitter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28428929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["golang","postgresql","sql"],"created_at":"2026-01-14T17:43:47.794Z","updated_at":"2026-01-14T17:43:48.455Z","avatar_url":"https://github.com/nrnrk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# psql-splitter\n\nSplit a (postgres) sql file into multiple files by a chunk of statements.\n\n## Installation\n\n`go get github.com/nrnrk/psql-splitter`\n\n## Usage\n\n`psql-splitter split {sql file} [-n {split by}]`\n\nFor example, if you split `sample.sql` like\n\n```\nSELECT * FROM users;\nSELECT * FROM others;\nINSERT INTO users\n    VALUES (12111, 'Mike', TRUE);\n```\n\nby 2 statements, execute the following command.\n\n`psql-splitter split sample.sql -n 2`\n\nThe 2 following files are generated.\n\nsample-aa.sql\n```\nSELECT * FROM users;\nSELECT * FROM others;\n```\n\nsample-ab.sql\n```\n\nINSERT INTO users\n    VALUES (12111, 'Mike', TRUE);\n```\n\nYou can confirm this split by `diff` command like\n\n```\ncat sample-* |diff sample.sql -\n```\n\n## License\n\nThis software includes the work that is distributed in the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrnrk%2Fpsql-splitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnrnrk%2Fpsql-splitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrnrk%2Fpsql-splitter/lists"}