# Changelog

## [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 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`.

- 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
...
...
