{"id":19778427,"url":"https://github.com/evancarroll/pg-gender","last_synced_at":"2025-08-03T12:09:36.045Z","repository":{"id":66753767,"uuid":"127828108","full_name":"EvanCarroll/pg-gender","owner":"EvanCarroll","description":"An implementation of a 3d-gender type modeled on a PostgreSQL cube","archived":false,"fork":false,"pushed_at":"2018-06-11T22:16:42.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-21T18:31:08.369Z","etag":null,"topics":["datatype","gender","postgresql","transgender"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EvanCarroll.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":"2018-04-03T00:27:21.000Z","updated_at":"2023-08-30T02:16:26.000Z","dependencies_parsed_at":"2023-02-22T19:15:34.195Z","dependency_job_id":null,"html_url":"https://github.com/EvanCarroll/pg-gender","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EvanCarroll/pg-gender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanCarroll%2Fpg-gender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanCarroll%2Fpg-gender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanCarroll%2Fpg-gender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanCarroll%2Fpg-gender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvanCarroll","download_url":"https://codeload.github.com/EvanCarroll/pg-gender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanCarroll%2Fpg-gender/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268542041,"owners_count":24266827,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["datatype","gender","postgresql","transgender"],"created_at":"2024-11-12T05:29:26.763Z","updated_at":"2025-08-03T12:09:36.013Z","avatar_url":"https://github.com/EvanCarroll.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"pg-gender\n====\n\nA progressive and inclusive model for gender in the database.\nbest.\n\nDescription\n----\n\nAn implementation of a three dimensional type, gender. [This\nmodel](https://www.genderspectrum.org/quick-links/understanding-gender/) comes\nfrom gender-spectrum.org which breaks down gender into\n\n* **Body** - *\"our body, our experience of our own body, how society genders\nbodies, and how others interact with us based on our body.\"*\n\n* **Identity** - *\"our deeply held, internal sense of self as male, female, a\nblend of both, or neither; who we internally know ourselves to be.\"*\n\n* **Expression** - *\"how we present our gender in the world and how society,\nculture, community, and family perceive, interact with, and try to shape our\ngender. Gender expression is also related to gender roles and how society uses\nthose roles to try to enforce conformity to current gender norms.\"*\n\nA user interface for this will require something like three sliders (for the\nthree axis dimensionality), or a 3d picker.\n\nInternally, each axis is stored as a `float`. On one side of the axis, we have\n\"female\" which is represented as `1`, and on the other side we have \"male\"\nwhich is represented as `-1`. The full range between `[-1,1]` can be used to\nrepresented the spectrum of each attribute. `0` represents known values.\n\nSynopsis\n----\n\n\t-- Known to not identify with a gender\n\tSELECT gender.mk_gender(0,0,0);\n\n\t-- Unknown gender\n\tSELECT undef::gender;\n\n\t-- Show the 3d gender (text-represetnation)\n\t-- And, the 2d-body, 2d-expression, and 2d-identity (text-representation)\n\tSELECT user_gender,\n\t\tgender.body(user_gender),\n\t\tgender.expression(user_gender),\n\t\tgender.identity(user_gender)\n\tFROM persons;\n\n\t-- Index it, and find those who identify in a similar fashion with KNN\n\tCREATE INDEX ON persons\n\t\tUSING gist (gender);\n\n\t-- You may want null::gender\n\tSELECT gender.polar_male();   -- Male   = mk_gender(-1,-1,-1)\n\tSELECT gender.polar_female(); -- Female = mk_gender( 1, 1, 1)\n\n\t-- Should return all gender-possibilities\n\tSELECT user_gender\n\tFROM table\n\tWHERE user_gender BETWEEN gender.polar_male() AND gender.polar_female();\n\nBackground\n----\n\nGender is tricky. We can all agree there are more than two genders, and this is\na serious attempt to model something more sophesticated in the database than\ncurrently available. **When standards like [IEC 5218](https://en.wikipedia.org/wiki/ISO/IEC_5218) are so flagrantly reactionary, we have an obligation not to follow them.**\n\nCaveat\n----\n\nTransphobia and alphabet soup jokes are not welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevancarroll%2Fpg-gender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevancarroll%2Fpg-gender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevancarroll%2Fpg-gender/lists"}