Version 0.62 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.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`.

- Rename functions `pg-read-attributes`, `pg-read-tuple`, `pg-read-char`, 
`pg-unread-char`,
  `pg-read-net-int`, `pg-read-int`, `pg-read-chars`, `pg-read-string`, 
`pg-send-char`,
  `pg-send-string`, `pg-send-octets`, `pg-send-uint`, `pg-send-net-uint` to use 
the naming
  convention for internal functions (`pg--` prefix).

- Microsoft Windows: add additional sleep using `sleep-for` when waiting for 
network data. The
  existing calls to `accept-process-output` with a timeout are insufficient on 
this platform when
  reading large resultsets. Further testing is needed to determine whether this 
is also necessary on
  other non-Linux platforms like MS-DOS and Darwin.

- Improve parsing of arrays that contain NULL elements: they will correctly be 
parsed as the
  `pg-null-marker` for arrays of bits, arrays of booleans, arrays of strings.


## [0.61] - 2025-11-22

- Add support for providing a password for authentication as a function, rather 
than as a string.
  This allows for integration with the auth-source functionality in Emacs, and 
helps to reduce the
  length of time where passwords remain present in RAM. Patch from @Kaylebor.

- New error class `pg-invalid-sql-statement-name` which is signalled when an 
invalid name is given
  to a prepared query.

- New error class `pg-invalid-cursor-name` which is signalled when an invalid 
name is used for a
  cursor.

- Integer arrays and floating point arrays containing NULL values will now be 
parsed correctly.


## [0.60] - 2025-09-21

- Add support for version 3.2 of the wire protocol, introduced in PostgreSQL 
v18. The only change
  with respect to the previously supported version 3.0 is the length of the key 
used to authenticate
  requests to cancel an ongoing query. As for libpq, we default to using 
version 3.0, because
  several PostgreSQL variants do not support version 3.2 and have not yet 
implemented the protocol
  version downgrade functionality that is designed into the protocol.

  Version 3.2 of the protocol can be selected by passing `(3 . 2)` as the value 
for the
  `:protocol-version` argument to `pg-connect-plist` and 
`pg-connect/direct-tls`, or by using
  a `protocol_version` URL parameter to `pg-connect/uri`.

- New function to establish PostgreSQL connections `pg-connect-plist`. This 
function is similar to
  `pg-connect`, but takes keyword arguments instead of optional arguments. 
Function `pg-connect` is
  deprecated. Similarly, the new macro `with-pg-connection-plist` should be 
used instead of
  `with-pg-connection` in new code.

- Recently introduced function `pg-connect/direct-tls` has been deprecated; use 
the `:direct-tls`
  option to `pg-connect-plist` instead.

- Add detection code and workarounds for the PostgreSQL variants OpenGauss (by 
Huawei) and pgsqlite.

- Add parsing support for arrays of time- and date-related objects.

- The input and output buffers used for communication with PostgreSQL are now 
trimmed when they
  become too large, with only the most recent data retained. The number of 
octets to retain for each
  buffer can be customized using the variable `pg-connection-buffer-octets`.


## [0.59] - 2025-08-31

- Add detection code and workarounds for the Yellowbrick PostgreSQL variant.

- Add support for parsing an `options` parameter in a connection string or 
connection URI, or for
  parsing the contents of the `PGOPTIONS` environment variable (as per the 
[libpq
  
behaviour](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS)).
 This
...
...

Reply via email to