[[!meta title="PGmacs: browsing and editing PostgreSQL databases from Emacs"]] [[!meta copyright="Copyright © 2024 Eric Marsden"]] [[!inline pages="internal(2024/info/pgmacs-nav)" raw="yes"]] # PGmacs: browsing and editing PostgreSQL databases from Emacs Eric Marsden (he/him) - [[!inline pages="internal(2024/info/pgmacs-before)" raw="yes"]] PGmacs provides an Emacs-based browsing and editing interface for the PostgreSQL DBMS. It allows you to browse the contents of database tables, in paginated mode for large tables, to edit column values in the minibuffer or using a widget-based interface, to delete, copy and insert new rows, and to save the contents of a table in CSV or JSON format. You can run shell commands on column values. You can also rename tables and columns, add SQL comments, and generate SchemaSpy diagrams. PGmacs works both in the terminal and in GUI mode. It uses the pg-el library, which implements the PostgreSQL wire protocol, to connect to PostgreSQL over the network or over a Unix socket. The talk will provide an overview of the functionality of PGmacs, then show how it can be easily extended to display images stored as database BLOBs inlined in a row-list buffer. About the speaker: Eric Marsden developed his first Emacs packages pg-el, coffee.el (an implementation of the essential Hyper Text Coffee Pot Control Protocol) and ipp.el as a procrastination exercise to avoid working on his PhD. He continues to use Emacs Lisp in his spare time. [[!inline pages="internal(2024/info/pgmacs-after)" raw="yes"]] [[!inline pages="internal(2024/info/pgmacs-nav)" raw="yes"]]