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.release notes
VALUES()Add support for
select ... from (values (...), (...), ...) sqastatementsWe support multi alter statements, so we shouldn't error.
We parse, but ignore,
PARTITION BYclauses inCREATE TABLEstatements in gms, so do the same thing here.Docs noting this here: update doltgres partition docs dolthub/docs#2392
rootFinalizerIterimplementsql.MutableRowIterWe've moved rules out of analyzer into
FinalizeItersso theapplyRowUpdateAccumulatoris applied afterwards.However, this seems to be a special
sql.RowIter, so we need to expose the child iterators through thesql.CustomRowIterinterface to apply that ruleDolt PR: Support multiple schema for system tables with $tablename for doltgres dolthub/dolt#8527
db.Ping(ctx)work correctly with DoltgresImplementations of
db.Ping(ctx)from Go'sdatabase/sqlpackage typically send some sort of empty query to test the liveness of a database connection. For example, thepqlibrary sends;and the pgx library sends-- ping.Before this change, Doltgres' parser would return an empty statement, instead of Vitess'
ErrEmptyerror, which caused GMS to try and execute a nil analyzed plan for these statements, return an error, and the ping check would fail. This change makes the Doltgres parser return the same VitessErrEmptyerror that the Vitess parser throws, sending the same signal to GMS to handle an empty statement without returning an error to the client. The related PR Update Parser interface documentation dolthub/go-mysql-server#2716 updates theParserinterface documentation to explicitly call out the requirement to returnErrEmptyin order for empty statements to be handled correctly.For testing, I've added some no-op statements to the smoke tests, but since these tests go through as prepared statements, they don't follow the exact code path as
db.Ping(ctx), so I've also added calls todb.Ping(ctx)in the test framework, which do reproduce this error. I've also added a unit test for Doltgres'Parserimplementation that explicitly tests empty statement parsing.Fixes:
db.Pingresults in error dolthub/doltgresql#884Related to: Update Parser interface documentation dolthub/go-mysql-server#2716
Added:
TODO:
ALTER TABLE(e.g.: modify existing column to domain type column)doltschemadolt_status->dolt.statusdolt_branches->dolt.branchesdolt_log->dolt.logdolt_tags->dolt.tagsdolt_docs->dolt.docsThese changes are mostly backwards compatible, unless you have an existing doc in
dolt_docs, which will need to be recreated after updatingnextval()to take a regclass instanceAllows the
nextval()function to take aregclassparameter. Also changes the output function ofregclassso that the returned relation name is schema-qualified if the schema is not onsearch_path.This change also moves the
GetCurrentSchemas()function into a newsettingspackage to break a package import cycle. The newsettingspackage is intended for low-level functions that access settings, without dependencies on other packages.Fixes: Column default value expression error dolthub/doltgresql#850
Depends on:
Support for schema names in foreign key definitions dolthub/go-mysql-server#2713
cross-schema foreign key support for doltgres tables dolthub/dolt#8479
set_config()Adds support for the
set_config()function.Example Usage:
set_config()function dolthub/doltgresql#852ALTER TABLESupportAdds support for additional
ALTER TABLEsyntax:UNIQUEconstraintCHECKconstraintAdding support for check constraints triggered an issue with string literal value quoting that affects check constraints and column defaults. The fix was to make
expression.Literal.String()match the behavior of GMS'expression.Literal.String()method and quote string literals. This required fixing another spot where we had been adding in quotes for string literals, as well as a small change in GMS (ChangingselectExprNeedsAliasto consider string literal quotes dolthub/go-mysql-server#2710).Fixes:
ALTER TABLE ... DROP CONSTRAINTdolthub/doltgresql#799ALTER TABLEdolthub/doltgresql#800Regresions Report:
The regressions listed below are a little tricky to read, but everything seems to be working correctly as far as I can tell. In the first regression listed (
INSERT INTO inhg VALUES ('foo');), this query now fails, because a previous statement now executes correctly to add a check constraint to a table, but ourCREATE TABLE LIKElogic incorrectly copies over check constraints.The rest of the regressions listed seem to actually be working correctly and I'm unable to repro problems with them, and they aren't reporting any errors in the regression report. For example, I've confirmed that the regression reported for
ALTER TABLE inhx add constraint foo CHECK (xx = 'text');actually executes correctly without error now, while onmainit returns the error:ALTER TABLE with unsupported constraint definition type *tree.AlterTableAddConstraint.Created by the Release workflow to update DoltgreSQL's version
This adds the majority of the core functionality that was missing for users, authorization, and privilege checking. This is missing rigorous testing, but that will be added in a separate PR (both engine and bats). All changes that will accompany those tests (such as missing statement support) will also be added in separate PRs.
Depends on: expose planbuilder methods for domain support in Doltgres dolthub/go-mysql-server#2697
TODO:
pg_typeALTER TABLE(e.g.: modify existing column to domain type column)Closed Issues
db.Pingresults in errorset_config()functionALTER TABLE ... DROP CONSTRAINTALTER TABLE