{"id":20643934,"url":"https://github.com/adjust/pg-ajversion","last_synced_at":"2026-02-17T22:01:38.128Z","repository":{"id":66824999,"uuid":"139600887","full_name":"adjust/pg-ajversion","owner":"adjust","description":"simple semantic version type for postgres","archived":false,"fork":false,"pushed_at":"2018-07-03T15:22:31.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-26T12:39:21.540Z","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":"postgresql","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adjust.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-07-03T15:08:08.000Z","updated_at":"2021-10-07T08:50:18.000Z","dependencies_parsed_at":"2023-08-01T08:15:54.711Z","dependency_job_id":null,"html_url":"https://github.com/adjust/pg-ajversion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adjust/pg-ajversion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg-ajversion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg-ajversion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg-ajversion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg-ajversion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adjust","download_url":"https://codeload.github.com/adjust/pg-ajversion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg-ajversion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29559961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"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-11-16T16:14:20.838Z","updated_at":"2026-02-17T22:01:38.112Z","avatar_url":"https://github.com/adjust.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ajversion\n\nA postgres type to store simple version numbers of the form /\\d+\\.?\\d*\\.?\\d*/\ninto a 4 byte integer.\n\n### usage\n\n```sql\nSELECT '6.7.4'::ajversion;\n ajversion\n-----------\n 6.7.4\n(1 row)\n\nSELECT major('12.5.7'::ajversion), minor('12.5.7'::ajversion), patch('12.5.7'::ajversion);\n major | minor | patch\n-------+-------+-------\n    12 |     5 |     7\n(1 row)\n\n```\n\n### Implementation\n\nInternal storage is a 4 byte unsigned integer. The 12 high bits are used to store the major version\nthe following 10 bits for the minor version and the last 10 bit for patch level.\n\nThis implies that an error is raised when the major version is bigger than 4095 or one of the other levels is\nbigger than 1023.\n\nParsing is done pretty lax, basically we try to find any (at most three) numeric values between non numeric (if at all characters).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fpg-ajversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadjust%2Fpg-ajversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fpg-ajversion/lists"}