LIVE
Rumours that AI labs can break encryption run ahead of the evidence AI-Assisted Search Points to a Possible Dwarf Planet in the Outer Solar System ICE Expands Surveillance Reach Using Flock Safety Camera Network via Local Police Proxies Startups Showcase Body-Integrated Tech with Smart Lenses and Graphene Bandages Nvidia CEO Jensen Huang Set for Congressional Hearings on China Ties and Chip Sales Dating App User Banned After Secretly Recording Dates for AI Analysis RuneScape Developer Jagex Urges Password Resets Following Security Breach Anthropic and OpenAI: how the enterprise AI race has shifted US Federal Cases Trace $974 Million in Banned Nvidia Hardware Rerouted to China Lawmakers to press Nvidia's Jensen Huang over alleged chip smuggling to China Rumours that AI labs can break encryption run ahead of the evidence AI-Assisted Search Points to a Possible Dwarf Planet in the Outer Solar System ICE Expands Surveillance Reach Using Flock Safety Camera Network via Local Police Proxies Startups Showcase Body-Integrated Tech with Smart Lenses and Graphene Bandages Nvidia CEO Jensen Huang Set for Congressional Hearings on China Ties and Chip Sales Dating App User Banned After Secretly Recording Dates for AI Analysis RuneScape Developer Jagex Urges Password Resets Following Security Breach Anthropic and OpenAI: how the enterprise AI race has shifted US Federal Cases Trace $974 Million in Banned Nvidia Hardware Rerouted to China Lawmakers to press Nvidia's Jensen Huang over alleged chip smuggling to China

gopgext Allows Developers to Build PostgreSQL Extensions Using Go

🤖 AI Models 1 min read 👁 7

A new tool named gopgext enables developers to author PostgreSQL extensions using plain Go code and TinyGo, automating the creation of C glue, install scripts, and control files.

gopgext Allows Developers to Build PostgreSQL Extensions Using Go🤖AI Models

Photo: Hacker News Front Page

Key points

  • Build PostgreSQL extensions using plain Go and TinyGo
  • Supports standard library features, data types, and custom structures
  • Enables triggers, custom index access methods, and foreign data wrappers

A newly introduced project called gopgext is giving developers the ability to write PostgreSQL extensions directly in plain Go by leveraging TinyGo. By simply marking a function with a specific directive, the system automatically handles the generation of C glue, control files, and installation scripts. The project supports standard Go library features including regular expressions, formatting, JSON encoding, cryptography, and generics, bridging standard programming practices with database management.

The software translates common data types such as strings, numbers, arrays, timestamps, and UUIDs directly into SQL equivalents while also allowing custom data types and composite structures to be defined in Go. Furthermore, developers can run SQL commands through SPI, manage logs, return errors with specific SQLSTATE codes, and write complex components like triggers, aggregates, foreign data wrappers, and custom index access methods.

According to the project details, several Go extensions can be loaded simultaneously into a single database backend. Safety measures ensure that PostgreSQL errors do not unwind through Go frames, and data results are securely copied directly into PostgreSQL memory. The architecture shares a similar methodology with gokm, a tool designed for building Linux kernel modules from Go.

Source Hacker News Front Page — jespino.github.io/gopgext/ ↗

Contact the newsroom

Got a tip, a proposal or a partnership question? Write to us and we will reply shortly.