{"id":16443006,"url":"https://github.com/skyzh/pg_poop","last_synced_at":"2025-03-23T08:32:02.482Z","repository":{"id":165275320,"uuid":"640622050","full_name":"skyzh/pg_poop","owner":"skyzh","description":"A Postgres extension that rewrites strings to 💩","archived":false,"fork":false,"pushed_at":"2023-05-14T18:02:48.000Z","size":5,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-18T19:20:01.534Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/skyzh.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":"2023-05-14T17:37:25.000Z","updated_at":"2024-12-01T10:44:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"710663b7-7912-485d-a682-076134df7527","html_url":"https://github.com/skyzh/pg_poop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyzh%2Fpg_poop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyzh%2Fpg_poop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyzh%2Fpg_poop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyzh%2Fpg_poop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyzh","download_url":"https://codeload.github.com/skyzh/pg_poop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245078067,"owners_count":20557274,"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-10-11T09:19:15.257Z","updated_at":"2025-03-23T08:32:02.464Z","avatar_url":"https://github.com/skyzh.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg_poop\n\nThis Postgres extension will rewrite all VARCHAR/TEXT columns with poop emojis. Only tested with pg15.\n\nThe extension was originally created as a demo plugin of [pgextmgrext][pgextmgrext], which is an extension manager (as\nan extension) that extends Postgres hooks to make it easier to develop Postgres extensions. The version using pgext can\nbe found [here][pgext_pg_poop].\n\n[pgextmgrext]: https://github.com/cmu-db/pgextmgrext/\n[pgext_pg_poop]: https://github.com/cmu-db/pgextmgrext/tree/master/pgext_pg_poop\n\n## Install\n\n```shell\ngit clone https://github.com/skyzh/pg_poop \u0026\u0026 cd pg_poop\nmake PG_CONFIG={PATH TO pg_config} USE_PGXS=1 install\n```\n\n## Usage\n\n```\npgextmgr=# select '1';\n ?column?\n----------\n 1\n(1 row)\n\npgextmgr=# LOAD 'pg_poop';\nLOAD\npgextmgr=# select '1';\n ?column?\n----------\n 💩\n(1 row)\n```\n\n## How does it work?\n\npg_poop will use the `ExecutorRun` hook in Postgres and replace the output destination with pg_poop's custom destination\npipe. In the pipe, it will find all varchar/text columns, get the size of the datum, and replace it with poop emojis of\nthe same length.\n\nOne alternative way to do pg_poop is to hook the planner and wrap all varchar/text output column with a function that\nreplaces all chars with emoji, which is how it worked in PostgreSQL Anonymizer extension.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyzh%2Fpg_poop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyzh%2Fpg_poop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyzh%2Fpg_poop/lists"}