Skip to content

0.57.3

Choose a tag to compare

@github-actions github-actions released this 04 Aug 19:01

Merged PRs

doltgresql

  • 3021: avoid reallocating slice and sorting during typecoll name resolution
  • 3020: use postgres error code
  • 3018: Add regression tests for bindvar type inference with #>> operator
    Fixes: #3012
    Depends on: dolthub/go-mysql-server#3663
  • 3015: Add support for ALL()
    The ALL() expression allows comparing a value with the results from a subquery or from an array, and testing how the value compares to all the values in that array or subquery result set.
    Fixes: #3013
  • 3010: added OUT params to dolt_* system functions
    Currently, all dolt_* functions return []text as their output, e.g.:
    select * from dolt_checkout('-b', 'new-branch');
    dolt_checkout
    ---------------------------------------
    {0,"Switched to branch 'new-branch'"}
    (1 row)
    This is also true of functions that return only a single scalar results, e.g. {0}.
    This PR changes this behavior to give all dolt procedures named OUT params so that they return column multiple column values or a single scalar, as the case may be.
    select * from dolt_add('.');
    status
    --------
    0
    (1 row)
    select status from dolt_add('.');
    status
    --------
    0
    (1 row)
    select dolt_add('.');
    dolt_add
    ----------
    0
    (1 row)
    This is a breaking change, but will enable customers who want to inspect the output of dolt_ functions to be able to do so much more cleanly. It also matches the behavior of built-in postgres functions with multi-value return semantics, such as pg_stat_file. Finally, it enables us to allow customers to write postgres-native SELECT constructs such as select status from dolt_checkout()..., which is not possible with the []text return type.
    Examples with multiple return values:
    postgres=> select * from dolt_checkout('-b', 'new-branch2');
    status |             message
    --------+----------------------------------
    0 | Switched to branch 'new-branch2'
    (1 row)
    postgres=> select message from dolt_checkout('-b', 'new-branch3');
    message
    ----------------------------------
    Switched to branch 'new-branch3'
    (1 row)
    select dolt_checkout('-b', 'new-branch4');
    dolt_checkout
    ----------------------------------------
    (0,"Switched to branch 'new-branch4'")
    (1 row)
    This should also work but doesn't yet, and can be added in a followup:
    postgres=> select (dolt_checkout('-b', 'new-branch3')).message;
    ERROR:  column "message" not found in data type record (errno 1105) (sqlstate HY000)
  • 3009: bug fix for joins on set-returning functions
  • 3008: fixed tests that were missing pgcatalog info
  • 3007: use given schema if exists as composite type for table parsed as column
  • 3005: pointer comparison for DoltgresType.Equals()
    Compare the pointers to the DoltgresTypes before comparing their Serialized bytes, because they are the same most of the time.
  • 3004: added missing functions for psql queries
  • 2999: table statistics support
  • 2995: commit generated files so doltgresql can be consumed as a dependency
    postgres/parser/build.sh generates five Go files that were gitignored, so they never reached the published module zip. Any consumer importing postgres/parser/... failed to build. This is a blocker for building a doltgresapi go service in DoltHub. This PR aims to make doltgres consumable as a library.
  • 2972: support OUT parameter in functions
    VARIADIC mode is still not supported yet.

Closed Issues

  • 3011: Querying a missing table returns SQLSTATE XX000 with a MySQL-shaped message instead of undefined_table (42P01)
  • 3012: Parameter compared to jsonb #>> text[] is inferred as json; PostgreSQL infers text
  • 3013: ALL (array) not supported — the standard cycle-check idiom in recursive CTEs fails
  • 2979: Server panic in kvexec lookup-join when the join key is not the first non-PK column (0.57.0 + 0.57.1)