Version 0.68 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.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 returned this subset is deprecated in 2026-03, replaced by `pgcon-connect-plist` which returns a full list including previously unsaved aspects such as the `tls-info`. - New function `pg-clone-connection` that establishes a new connection to PostgreSQL “cloned” from its argument, an existing PostgreSQL connection. Opens a new connection to the same PostgreSQL instance, using the same authentication information. This function works both for TCP connections to the database and for local (Unix socket) connections. - Add code to detect PostgreSQL variants SereneDB, Apache Cloudberry and Picodata. - Add workarounds for the SereneDB variant, which does not currently implement the standard information schema but implements PostgreSQL-style system tables. - Add workarounds for the Picodata variant, which does not implement many of the PostgreSQL system tables. ## [0.63] - 2026-02-08 - Add support for looking up connection passwords using the Emacs auth-source functionality. If variable `pg-use-auth-source` is non-nil and a null value for password is provided to `pg-connect-plist` or `pg-connect-local` (including indirectly via `pg-connect/uri` or `pg-connect/uri`), the password will be looked up in configured auth-sources. If not found, an empty string is used as password. ## [0.62] - 2025-12-26 - New function `pg-table-acl` which returns the access control list for a specified table. - Type aliases are recognized as type names in `pg-exec-prepared`, in additional to the type names present in the `pg_type` system table. This means that you can use `bigint` as an alternative to `int8`, `real` as an alternative to `float4`, `bit varying` as an alternative to `bit`, for example. The aliases are also the canonical type names as shown by function `pg_typeof`. ... ...
