0.51.0
Merged PRs
doltgresql
- 1641: Fix binary encoded bind vars
Bind vars can be specified in a string format or a binary format. The library Doltgres uses for decoding the bind vars (pgtype) errors out when converting some types in binary format to string format. The error looks like:cannot scan timestamp (OID 1114) in binary format into *string.
As part of fixingtimestamp, I also found thatdateandboolneeded special handling, too, and I updated our prepared statement tests with more type coverage and to ensure we hit both the string format and binary format bind var code paths.
Fixes: #1419 - 1639: Perf improvement for oid_eq
OID equality is found very commonly in expensive joins on pg_catalog tables, and was revealed to be a major bottleneck in SQLAlchemy performance via profiling. - 1638: Remove duplicate type definitions
Removes two duplicate type definitions. Original customer report also mentioned unused tokens, although those have been left in, since they are valid Postgres tokens and many will likely be used as we continue extending Doltgres support.
Related to: #1592 - 1634: Named all anonymous callable funcs in binary func package
- 1633: Removed wasteful engine instantiation
This takes 30% or more off pg_catalog accesses. Before:

After:

- 1632: Remove error out for global parameters
Erroring out is preventing gms from setting system variables when server starts (dolthub/go-mysql-server#3005) since AssignValues calls InitValue with global set to true. - 1630: Small bug fixes for SQLAlchemy compatibility
- 1610: support for bool_and, bool_or
Also unskipped a few formerly skipped tests for another aggregate function since it's now supported by the engine. - 1605: Added GCC and Clang building
This extends the definitions build script to search for GCC and Clang too. These were all tested and confirmed to work locally. - 1604: Fix
SETqueries to expectOKResult
companion pr: dolthub/dolt#9441 - 1601: parse MM DD HH:MM:SS YYYY format for timestamp type
- 1595: scripts/build_binaries.sh: Windows builds: statically link libssp so that doltgres.exe does not have a dependency on MinGW at runtime.
Also picks up newer versions of our crosstools toolchain and sets the platform_version metadata in the MacOS builds so that they will be more compatible with App Store release in the future if the Workbench ever supports Doltgres. - 1593: support timezone input in time and timetz types
- 1589: Support for set-returning functions
Depends on dolthub/go-mysql-server#3054 - 1573: Fix dolthub/dolt#483 - truncate expected err str due to auto-gen postfix
Fixes dolthub/dolt#483
Removed Doltgres over specific expected error string on constraint check test - 1570: Fix dolthub/dolt#483 - add skip for remote tracking branch and table same name test
Fixes dolthub/dolt#483
Add skip for test sincedoltgresharness does not create remote dir withh.UseLocalFileSystem() - 1562: support set returning function
- 1555: Added partial support for CREATE EXTENSION
Relies on:- dolthub/pg_extension#4
This implements support forCREATE EXTENSION, in that onlyuuid-osspis tested. This doesn't handle everything else that's needed forDROP EXTENSION, such as tracking the created artifacts. There are also some skipped tests where the results aren't quite what are expected, but besides that everything works assuming the environment requirements are satisfied.
- dolthub/pg_extension#4
- 1544: Added generated system tables to pg_catalog tables
Relies on dolthub/dolt#9339
Also fixes a bug in NOT IN expressions - 1536: Add support for
UPDATE ... FROM
Adds support for usingUPDATE ... FROMstatements to update a table using data joined from other tables.
The biggest gap I'm aware of is support for executing triggers on the updated table. GMS needs some additional changes to clean up the interface forplan.GetUpdatable()and needs to return implementations ofsql.DatabaseSchemaTablein order for Doltgres triggers to work withUPDATE ... FROMstatements.
Depends on: dolthub/go-mysql-server#3016 - 1534: support char type with length for string input
- 1522: Add support for
SELECTstatements with no expressions
Resolves #1470 - 1520: Add support for
IS NULLexpression on records
Postgres semantics forIS NULLandIS NOT NULLdiffer slightly from the the MySQL semantics implemented in GMS. For records and composites,IS NULLreturns true if the record/composite itself isNULLor if all values in the record/composite areNULL.IS NOT NULLreturns true only if all values in the record/composite are notNULL. Note that this means, for records and composites in Postgres,IS NOT NULLis not equivalent toNOT(IS NULL).
This change adds custom implementations ofIS NULLandIS NOT NULLto support Postgres' behavior with records and composites.
Depends on: dolthub/go-mysql-server#3064 - 1515: Support for ORDER BY in array_agg
Depends on dolthub/go-mysql-server#3001
This invalidates the previous approach, but I want feedback on this technique before I remove it. - 1504: Implemented pg_type_is_visible
Also added user types to pg_types table
Partial fix for #1465 - 1497: array_agg support and general framework for postgres aggregate functions
Other aggregate functions will require type overload resolution logic that this first function, array_agg, does not.
Also not yet supported: theORDER BYclause in the function, e.g.:Relies on dolthub/go-mysql-server#2992array_agg ( anyarray ORDER BY input_sort_columns ) - 1495: fix displaying correct column name for dolt_ tables
This behavior was introduced in #1408 - 1489: set ReadyForQuery transaction indicator for in transaction query
Depends on dolthub/go-mysql-server#2986 - 1473: Bug fixes for
EXISTS, prepared statement typing - 1471: new gms and fix compile errors
- 1467: Bug fix for name resolution
This fixes the failing query in #1464 - 1458: Implemented support for various SHOW statements
One of the new tests for SHOW SEQUENCES exposes a very bad bug:I'm worried this is something pretty nasty in session / context management in doltgres.error running query: dangling ref: found dangling references to HashSet { a084r0i9e18t0gq6m3s6qmp86pfq4hos dq8tbqfe39u1hah2bs0ilg63rfk3vok2 } - 1451: Add
ROW()record constructor support
Initial support for theROW()constructor expression, which creates anonymous records.
This PR adds support for basic uses of theROW()constructor, such as creating records from groups of expressions, selecting records, comparing records, and using records inWHEREclauses. There are still severalrecordfeatures that don't work yet, such as using a table alias with theROW()constructor.
Fixes: #1425
Depends on: dolthub/go-mysql-server#2982 - 1448: Added test for VALUES() select statements interacting with prepared statements
Confirmed fix for #1424
Closed Issues
- 1464: SQLAlchemy Demo no work with Doltgres
- 1419: Error for
INSERTusing prepared statement with timestamp column - 1430:
OFFSET $1errors withunsupported syntax: <nil> - 1470: SELECT FROM ... support
- 1334:
ORDER BYsupport in aggregate functions - 1425: ROW keyword for tuples not yet supported
- 1424: unable to prepare query: unsupported syntax