PostgreSQL Extensions in Go
Hacker News 热议:PostgreSQL Extensions in Go(95 赞 / 11 评论,来源 jespino.github.io)
一句话概要
Build PostgreSQL extensions from plain Go code, using TinyGo: functions marked with //gopgext:function become SQL functions.
原文开头节选
gopgext builds PostgreSQL extensions from plain Go code, using TinyGo. Mark a function with //gopgext:function and it becomes a SQL function: gopgext writes the C glue, the install script and the control file.
A project is plain Go files. The standard library works: fmt , regexp , encoding/json , crypto/* , maps, generics, iterators, defer / recover .
Strings, numbers, arrays, NULL s, sets, rows, timestamps, UUIDs and JSON map to SQL types. Define your own data types and composite types in Go.
Run SQL through SPI, return errors with SQLSTATE codes, log, read settings and stay responsive to query cancellation.
(以上为原文节选,完整内容见下方”原文来源”)
这条动态今日登上 Hacker News 首页(95 赞 / 11 评论,来源 jespino.github.io)。技术雷达每日自动聚合 AI 工程、后端架构、DevOps 方向的前沿动态;相关工程落地可浏览下方的相关服务与延伸阅读,或直接与我们团队交流。
原文来源: Hacker News