Help us shape the future of Go! Take the 2026 Go Developer Survey

postgres

package
v0.0.0-...-d5346c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package postgres runs Nectar's storage on PostgreSQL.

It is the backend for deployments that need real concurrency: SQLite allows one writer at a time, which is a documented limit rather than a bug, and this one does not.

Everything but this file lives in internal/storage/sqlstore, shared with SQLite. What is here is the whole of the difference -- placeholder syntax, how an insert reports its surrogate key, full-text search, and the DDL. That the list is this short is the point: the schema was built portable from the first migration, and this port is a translation rather than a rewrite.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(dsn string, idx *conformance.Index) (*sqlstore.Store, error)

Open connects to a PostgreSQL database and prepares the schema.

dsn is a libpq connection string or a postgres:// URL.

func Rebind

func Rebind(query string) string

Rebind renumbers "?" placeholders as "$1", "$2", and so on, which is what lets every query in the shared implementation be written once. Exported for the test that pins its treatment of quoted literals.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL