{"id":32149102,"url":"https://github.com/pl-swift/plswift","last_synced_at":"2026-02-19T07:01:39.826Z","repository":{"id":63920323,"uuid":"116408798","full_name":"PL-Swift/PLSwift","owner":"PL-Swift","description":"PostgreSQL Functions in Swift","archived":false,"fork":false,"pushed_at":"2019-05-12T10:56:07.000Z","size":35,"stargazers_count":45,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-22T07:12:07.121Z","etag":null,"topics":["postgresql-extension","postgressql","swift"],"latest_commit_sha":null,"homepage":"https://pl-swift.github.io","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PL-Swift.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":"2018-01-05T17:14:06.000Z","updated_at":"2024-11-11T06:58:35.000Z","dependencies_parsed_at":"2023-01-14T14:00:49.772Z","dependency_job_id":null,"html_url":"https://github.com/PL-Swift/PLSwift","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/PL-Swift/PLSwift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PL-Swift%2FPLSwift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PL-Swift%2FPLSwift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PL-Swift%2FPLSwift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PL-Swift%2FPLSwift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PL-Swift","download_url":"https://codeload.github.com/PL-Swift/PLSwift/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PL-Swift%2FPLSwift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29605799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"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":["postgresql-extension","postgressql","swift"],"created_at":"2025-10-21T09:37:46.305Z","updated_at":"2026-02-19T07:01:39.821Z","avatar_url":"https://github.com/PL-Swift.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2\u003ePL/Swift\n  \u003cimg src=\"http://zeezide.com/img/plswift.svg\"\n       align=\"right\" width=\"128\" height=\"128\" /\u003e\n\u003c/h2\u003e\n\n![PostgreSQL](https://img.shields.io/badge/postgresql-10-yellow.svg)\n![Swift3](https://img.shields.io/badge/swift-3-blue.svg)\n![Swift4](https://img.shields.io/badge/swift-4-blue.svg)\n![Swift5](https://img.shields.io/badge/swift-5-blue.svg)\n![macOS](https://img.shields.io/badge/os-macOS-green.svg?style=flat)\n![tuxOS](https://img.shields.io/badge/os-tuxOS-green.svg?style=flat)\n\n\n**PL/Swift** allows you to write custom SQL functions and types\nfor the\n[PostgreSQL](https://www.postgresql.org) database server\nin the \n[Swift](http://swift.org/)\nprogramming language.\n\n\u003ccenter\u003e\u003ci\u003eBringing Swift to the Backend of the Backend's Backend\u003c/i\u003e\u003c/center\u003e\n\nA small tutorial can be found over here:\n[PL/Swift - PostgreSQL Functions in Swift](http://www.alwaysrightinstitute.com/plswift/).\n\n### PL/Swift\n\nDespite the name it is not (currently) a language extension like say\n[PL/Python](https://www.postgresql.org/docs/current/static/plpython.html),\nwhich allows you to directly embed Swift code in SQL.\nInstead it provides the infrastructure to create PostgreSQL\ndynamically loadable objects.\n\nThis project/sourcedir contains the `swift-pl` tool,\nXcode base configurations and module maps for the PostgreSQL server.\n\n\n### What is a PL/Swift Extension\n\nA dynamically loadable PostgreSQL extension module consists of those files:\n\n- the ext.control file, specifies the name and version of the extension\n- the ext.sql file, hooks up the C function w/ PostgreSQL\n  (i.e. does the `CREATE FUNCTION`)\n- the actual ext.so shared library\n\n\n### Using the PL/Swift package\n\n*NOTE*: This *requires* a PL/Swift installation. W/o it, it will\n        fail to built CPLSwift!\n\nIf you setup a new module from scratch, use:\n\n    swift pl init\n    \nfor example:\n\n    mkdir base36 \u0026\u0026 cd base36\n    swift pl init\n\nOtherwise setup your Package.swift to include PLSwift:\n\n```Swift\nimport PackageDescription\n\nlet package = Package(\n  name: \"MyTool\",\n\n  dependencies: [\n    .Package(url: \"git@github.com:PL-Swift/PLSwift.git\", from: \"0.5.0\"),\n  ]\n)\n```\n\nNote: If you are using Swift older than 4.2, you need to use the `swift3`\nbranch (`0.3.0` version tag).\n\n\n# Building a PL/Swift module\n\nSimply invoke\n\n    swift pl build\n\nThis wraps Swift Package Manager to build your package\nand then produces a proper module which can be loaded\ninto PostgreSQL.\n\nTo install the module into the local PostgreSQL, call:\n\n    swift pl install\n\n\n### Use/load the extension\n\nThat is very simple, just do a:\n\n```sql\nCREATE EXTENSION helloswift;\n```\n\nIf you rebuild the extension and need to reload, you probably need to\nrestart / reconnected\n`psql` and do a `DROP EXTENSION xyz` first.\n\n\n### Status\n\nConsider this a demo. Though it should work just fine.\n\nPlans:\n\n- can we make it a real language module? i.e. embed Swift code in the\n  SQL and compile it on demand? Why not, might be a bit heavy though.\n\n### Links\n\n- [mod_swift](http://mod-swift.org/), write Apache2 modules in Swift\n- [PostgreSQL Server Programming](https://www.postgresql.org/docs/current/static/server-programming.html)\n- [PostgreSQL C Language Functions](https://www.postgresql.org/docs/current/static/xfunc-c.html)\n\n### Who\n\n**PL/Swift** is brought to you by\n[ZeeZide](http://zeezide.de).\nWe like feedback, GitHub stars, cool contract work,\npresumably any form of praise you can think of.\n\n\u003ctable width=\"100%\" border=\"0\"\u003e\n    \u003ctr style=\"width: 100%;\"\u003e\n      \u003ctd align=\"center\" width=\"33%\"\u003e\n        \u003ca href=\"http://apacheexpress.io\"\n          \u003e\u003cimg src=\"http://zeezide.com/img/ApexIcon128.png\" width=\"64\" height=\"64\" /\u003e\u003c/a\u003e\n\t\u003cbr /\u003e\n\tApacheExpress\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"33%\"\u003e\n        \u003ca href=\"http://mod-swift.org\"\n          \u003e\u003cimg src=\"http://zeezide.com/img/mod_swift-128x128.png\" width=\"64\" height=\"64\" /\u003e\u003c/a\u003e\n\t\u003cbr /\u003e\n\tmod_swift\n      \u003c/td\u003e\n      \u003ctd align=\"center\" width=\"33%\"\u003e\n        \u003ca href=\"http://zeeql.io\"\n          \u003e\u003cimg src=\"http://zeezide.com/img/ZeeQLIconQL128.png\" width=\"64\" height=\"64\" /\u003e\u003c/a\u003e\n\t\u003cbr /\u003e\n\tZeeQL\n      \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpl-swift%2Fplswift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpl-swift%2Fplswift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpl-swift%2Fplswift/lists"}