gitwtfhub

wtf is pg?

mdelapenya/pg — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2023-02-08

GoAudience · developerComplexity · 3/5DormantSetup · moderate

TL;DR

A Go library that lets developers save, load, and update PostgreSQL data using plain Go structs instead of hand-written SQL queries.

Mindmap

mindmap
  root((repo))
    What it does
      Maps Go structs to tables
      Generates SQL automatically
      Handles relationships
    Tech stack
      Go
      PostgreSQL
    Use cases
      Build web APIs
      Store app data
      Avoid raw SQL
    Audience
      Go developers
    Status
      Maintenance mode
      Successor is Bun

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Save and retrieve Go struct data from PostgreSQL without writing raw SQL.

REASON 2

Build a web API or CMS backed by PostgreSQL with less boilerplate code.

REASON 3

Link related data, like a Story to its Author, without writing manual joins.

REASON 4

Work with PostgreSQL-specific types like arrays and JSON fields from Go.

What's in the stack?

GoPostgreSQL

How it stacks up

mdelapenya/pg42wim/fabio42wim/go-xmpp
LanguageGoGoGo
Last pushed2023-02-082018-02-042020-01-24
MaintenanceDormantDormantDormant
Setup difficultymoderatemoderatemoderate
Complexity3/53/53/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Project is in maintenance mode, the same team's newer multi-database tool Bun is recommended for new projects.

Yoink these prompts

Prompt 1
Show me how to define a Go struct and save it to PostgreSQL using this library.
Prompt 2
Help me write an Insert, Update, and Delete method for a User struct with this library.
Prompt 3
Explain how this library handles relationships like linking a Story to its Author.
Prompt 4
Should I use this library or migrate to Bun for a new Go and PostgreSQL project?

Frequently asked questions

wtf is pg?

A Go library that lets developers save, load, and update PostgreSQL data using plain Go structs instead of hand-written SQL queries.

What language is pg written in?

Mainly Go. The stack also includes Go, PostgreSQL.

Is pg actively maintained?

Dormant — no commits in 2+ years (last push 2023-02-08).

How hard is pg to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pg for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.