Merged
Conversation
iMichka
approved these changes
Apr 16, 2025
Contributor
|
🤖 An automated task has requested bottles to be published to this PR. Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch. |
auto-merge was automatically disabled
April 16, 2025 20:50
Pull Request is not mergeable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created by
brew bumpCreated with
brew bump-formula-pr.Details
release notes
Only supports one-dimension subscripts and no slices
Also added stubs for a couple functions used by various psql commands
ALTER TABLE ... DROP CONSTRAINT IF EXISTSDepends on: Add support for
ALTER TABLE ... DROP CONSTRAINT IF EXISTSdolthub/go-mysql-server#2936Depends on: Add AST support for
DROP CONSTRAINT IF EXISTSdolthub/vitess#411default_with_oidsPostgres docs
A few sample Postgres dumps set
default_with_oids. This change allows them to set the parameter without triggering an error. Note that Doltgres does not support creating tables with OID columns, even if this parameter is set to true.ANALYZE;without any tables specifiedWhen Postgres processes an
ANALYZE;statement without any tables explicitly specified, it analyzes all tables.Postgres docs
Removes the Doltgres custom analyzer rule that added an implicit prefix length to
TEXTcolumns when they were used in a key.This PR adds a couple compatibility features for commands issued by psql:
operator(...)syntax for built-in postgres operatorsThese two things get us to near 100% coverage for psql commands without special casing. The last piece is the
array(select ...)syntax.Relies on Corrected return type for RegexpLike dolthub/go-mysql-server#2931
current_settingFor
current_setting('server_version_num')errors dolthub/doltgresql#1366CREATE TABLEformatter supportThis lets
dolt_mergecorrectly handle tables with column default values, constraints, etc. As part of the merge, Dolt generates and then parses theCREATE TABLEstatement for the table being merged.v6.1.0 includes a fix for building on MacOS 15.4
I've left a fairly detailed comment for the future, but it doesn't quite explain the exact issue here. It's more so to prevent making a change that would lead to the issue again.
In a nutshell, we were always adding boolean literal expressions in our
startandstopexpressions, which define the start and stop positions for the underlying tuple iterator. With the Dolt change to fix a case of incorrect results, we were met with even worse results in some circumstances. With the original logic, these literals were harmless to include in multi-expression ranges, but they fundamentally changed the behavior of the stop position with the new logic. They're required to be there though if there are no other expressions, hence it made sense to just always include them. The behavioral change isn't obvious at first glance, hence the need for the long comment (which should make it appear relatively obvious after reading).This also makes use of
QuickFunctionwhere possible, which should always be true for tuple-level filtering, and should provide a small speedup in those cases.Fixes Django requires CREATE INDEX with what looks like a regex pattern dolthub/doltgresql#1331
Also fixes an encoding bug: limited length varchar columns were always being encoded out of band.
Tests for the changes in Bug fix for doltgres range iter dolthub/dolt#9061
Also fixes a bug in parsing --prof args
We were previously modeling an inline constraint definition as a separate DDL command. This changes it to be consistent with how GMS and Dolt works, by using a single DDL command, and setting the constraint action.
When specifying parameters for a prepared query, callers can specify OID zero to instruct the server to infer the type. Doltgres was error'ing out in this case, because it couldn't find a valid OID registered for zero. This changes Doltgres to infer types when the specified parameter OIDs contains a zero.
Found while testing a basic Rails app with Doltgres.
GENERATED BY DEFAULT AS IDENTITYinCREATE TABLEstatementFixes Django uses
PRIMARY KEY GENERATED BY DEFAULT AS IDENTITYin create table which parse but does not generate a default dolthub/doltgresql#1328Adds support for three Postgres advisory lock functions:
pg_try_advisory_lock()pg_advisory_lock()pg_advisory_unlock()A couple TODOs call out follow-ups to make
LockSubsystemwork better with Postgres' behavior, such as supporting reentrant locking.Fixes: Standard Rails deployments require
pg_try_advisory_lock()function dolthub/doltgresql#1262Fixes #1323
ALTER .. OWNERstatements, which are no-opsAlso improved the error message for certain type errors.
ALTER TABLE ADD COLUMNto specify an inline FK constraintThe regressions listed below are caused by us now honoring the inline check constraint definition, instead of ignoring them. GMS doesn't update the scope with the new column, so check constraints that use the column at the same time as adding it don't work properly. MySQL also supports this behavior, but we don't support it in GMS yet, so the fix for these regressions will be in GMS.
INSERT .. RETURNINGALTER COLUMNto assert that column default expressions are resolvedAltering a column with an existing column default expression was triggering a panic in Doltgres, because Doltgres'
TypeSanitizerwas finding anUnresolvedColumnDefaultinstance in theplan.ModifyColumninstances'scolumnfield.This is not an issue from Dolt or GMS, because they don't support MySQL's syntax to alter a single component of an existing column, without requiring its full column definition to be respecified. (And also because they don't use Doltgres'
TypeSanitizer.)Depends on Bug fix for TypeCompatibilityChecker to ignore ExtenedTypes dolthub/dolt#8994
Depends on Bug fix: resolve column default expressions for ALTER COLUMN nodes dolthub/go-mysql-server#2895
ENCODINGinCREATE DATABASEFixes Standard Rails deployments require ENCODING syntax dolthub/doltgresql#1261
INSERT INTO ... ON CONFLICTMatches Postgres' behavior where default foreign key name collisions are resolved by adding an integer suffix to the name to make it unique.
Also includes a bug fix for setting the target schema when dropping a primary key.
Fixes a couple more issues with supporting DoltHub's schema in Doltgres.
Relies on Allow type conversions for foreign key checks dolthub/go-mysql-server#2888
This reworks root objects so that they actually work, as they previously did not (outside of the session cache).
Closed Issues
current_setting('server_version_num')errorsANALYZEwith no tables specifiedpg_try_advisory_lock()functionPRIMARY KEY GENERATED BY DEFAULT AS IDENTITYin create table which parse but does not generate a default::timestamptzsyntax on dates and Doltgres cannot parseas ofsyntax not supported yetINSERT INTO...ON CONFLICTDROP TABLEshould sort tables by dependencies