Version 0.70 of package Pg has just been released in NonGNU ELPA. You can now find it in M-x list-packages RET.
Pg describes itself as: ================================================= Socket-level interface to the PostgreSQL database ================================================= More at https://elpa.nongnu.org/nongnu/pg.html ## Summary: # pg.el -- Emacs Lisp socket-level interface to the PostgreSQL RDBMS ## Recent NEWS: # Changelog ## [0.70] - 2026-11-07 - New error types `pg-invalid-parameter-value` and `pg-invalid-escape-sequence`, subtypes of `pg-data-error`. - Support the `sslnegotiation` [parameter keyword](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS) in `pg-connect/uri` and `pg-connect/string`. When combined with a value of `sslmode` that enables TLS, a value of `direct` means that a direct TLS connection will be etablished, rather than using the traditional PostgreSQL protocol negotiation procedure. - Internal functions `pg-do-md5-authentication`, `pg-do-sasl-authentication`, `pg-sasl-prep` have been renamed to use the `pg--` prefix instead of `pg-`. - Improved detection of the PostgreSQL variant Multigres. - A bug in the logging of values used for fetch requests in extended query mode has been fixed. - Adjust for changes to the internal representation of times in Emacs 31.x. - Improve compatibility with PostgreSQL variants pgsqlite and Umbra. ## [0.69] - 2026-08-12 - Incompatible change: single items of type `bit` are now parsed as an Emacs Lisp boolean (`t` or `nil`), instead of as a boolean vector of dimension 1. Items of type `varbit` and `bit(n)` are still parsed as Emacs Lisp bool-vector objects. - The value `NULL` can be passed as an argument in the extended query protocol (use `nil` as the value). Patch from @LuciusChen. - Add parsing support for arrays of bits (`_bit` type), which are parsed as vectors of Emacs Lisp booleans. - Add parsing and serialization support for arrays of hstore objects (`_hstore` type), which are represented in Emacs Lisp as vectors of hashtables. - New error type `pg-invalid-function-definition`. - Add support for detecting PostgreSQL variants Turso (the experimental tursopg frontend), Umbra (a research database developed at TU München) and Immudb. ## [0.68] - 2026-06-19 - Parse one-dimensional array values that PostgreSQL returns with explicit dimension bounds, such as `[-33:-31]={100,200,300}` (patch from @LuciusChen). - Expose the latest `ReadyForQuery` transaction status on connections via `pgcon-transaction-status` (patch from @LuciusChen). - New error types `pg-bad-copy-file-format`, `pg-protocol-violation` and `pg-dependent-objects-still-exist`. - The SQLSTATE value supplied by PostgreSQL is reported when an error is signaled, to help the user find documentation on the exact error type. - An empty implementation of `pg-table-comment` and its setf function are provided for the Picodata variant. - Implement the function `pg-function-p` for the Picodata variant. This only works for user-defined functions, and not for builtin functions. - An implementation of `pg-schemas` is provided for the Datahike variant. ## [0.67] - 2026-06-07 - Implement support for PostgreSQL variant Datahike with pg-datahike adapter. - Implement support for the H2 embeddable database. - Implement support for the XTDB immutable database. - SereneDB variant: improve the filtering out of system tables in `pg-tables`. ## [0.66] - 2026-05-02 - Fix a bug in our type serialization support. PostgreSQL makes it possible to define a rowtype (user-defined composite type) with the same name as a builtin type, so we make sure that system-defined types are chosen over user-defined types when serializing objects. - Implement `pg-function-p` for the Risingwave variant. Unfortunately this implementation only recognizes user-defined functions, and not builtin functions. ## [0.65] - 2026-04-18 - Implement `pg-table-owner` and `pg-databases` for PostgreSQL variant Picodata. - Implement `pg-databases` for PostgreSQL variant Clickhouse. - Add code to detect PostgreSQL variant PGDuckDB, for function `pgcon-server-variant`. - Tests: add tests for the extended query protocol. ## [0.64] - 2026-03-28 - Save all connection info in the pgcon object, for possible later use by `pg-cancel`, rather than only a subset of the user-specified connection info. The function `pgcon-connect-info` which ... ...
