Skip to content

v1.16.1 — get-else fix; pg_mentat tarballs load on glibc 2.34+ again

Choose a tag to compare

@github-actions github-actions released this 19 Oct 14:31
· 337 commits to master since this release
v1.16.1
b752845

mentat 1.16.1: get-else fix, and pg_mentat tarballs that load on older Linux again

Fixed

  • get-else failed in any query with more than one :where pattern.
    Every call errored with:

    ERROR: invalid reference to FROM-clause entry for table "datoms0"
    

    For example, this query failed on 1.16.0 and now works:

    [:find ?v ?p :where [?c :t/kind :chat] [?c :t/value ?v]
                        [(get-else $ ?c :t/private false) ?p]]

    get-else used to compile to a LEFT JOIN placed after the other patterns.
    PostgreSQL attached it to the last one only, so the join could not see the
    pattern that bound the entity. It is now a correlated subquery, so it works
    with any number of patterns, in any order, and more than once per query.

  • get-else with asOf / since returns the value at that point in
    time. Before, it could return a later or superseded value.

  • The 1.16.0 pg_mentat tarballs did not load on Debian 12, Ubuntu 22.04,
    RHEL 9 or Amazon Linux 2023.
    CREATE EXTENSION failed with
    version `GLIBC_2.38' not found. They were built on a glibc 2.39 host.
    1.16.1 is built on Debian 12 and needs glibc 2.34, as 1.15.0 did. The
    release job now fails if a build needs more
    (#336).

Changed

  • get-else on a cardinality-many attribute is now an error, as in
    Datomic. It used to return one row per value, and only in single-pattern
    queries. Use a data pattern for such attributes.

Upgrading (PostgreSQL)

  1. Install the .so and SQL files for your PostgreSQL major
    (pg_mentat-pg15 … pg_mentat-pg19).
  2. Run ALTER EXTENSION pg_mentat UPDATE;. There is no schema change.

We tested this on Debian 12 with PostgreSQL 15–19. An existing 1.15.0
database upgrades in place and then returns the correct results for the
reported queries.

Known issues

  • A get-else (or arithmetic) result can't be used in a predicate yet; it
    fails with unbound-var
    (#334). This was already
    the case before 1.16.1.
  • The embedded SQLite store and the DuckDB extension don't implement
    get-else / missing?
    (#335).
  • A non-superuser can't CREATE EXTENSION pg_mentat
    (#331).

Full details: CHANGELOG.