You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
584: add more pg functions and extract() function
Added temporary resolution for handling ENUM type as TEXT type until we support CREATE TYPE statement.
Added functions:
530: Fixed function resolution for NULLs
We had a workaround to allow function resolution to handle NULL expressions (NULL values worked fine since they still resolved to a non-NULL type). This adds the necessary logic so that we no longer need the workaround, and the NULL expression is properly resolved.
523: Convert all dolt_ procedures to functions so they can return values
This PR also adds basic support for a Composite type, which needs to be fully fleshed out. Its values are sql.Row and its mysql wire type is Tuple.
This works, in that you can now run e.g.
select dolt_commit('-am', 'mymessage');
I'm looking for feedback on this approach before I spend any more time polishing it up and adding more tests.
We will also want to support this syntax:
select*from dolt_commit(...);
For functions that return composite types, the first syntax will return a single formatted column result, while the latter will return a the same number of columns, in the same types, as the underlying composite type. The latter is probably how most people will use this functionality if they want to examine the result of these function calls. Support for that syntax will be in a future PR.
492: Added regclass and regproc
This adds regclass and regproc, in addition to everything needed to support their full functionality. The hashing approach we previously used for OIDs were not compatible as-is, and reverse hashing would require extensive modifications to track all side-effects (table renames, etc.) in addition to needing some way to resolve hash collisions, so an approach similar to the one I proposed in the OID document was used.
OIDs are now treated as indexes into arrays, and all database elements (tables, views, etc.) are iterated in a deterministic way, such that we can imagine that all tables are just a single large array containing every table from every schema, all views are a single large array, etc. This let's us get a definitive OID for any database element, and also when given any OID, we are able to grab the relevant database element.
This is done by splitting an OID's bits into three sections.
Section: This is a header that specifies the search space. For example, tables have their own search space since we can iterate over all of them using database.GetTableNames and database.GetTableInsensitive. Each item has its own section, since they all have their own search spaces.
SchemaIndex: This is the index of the relevant schema. We order schemas by sorting them by their names (ascending), so the index gives us exactly the schema to use.
DataIndex: This is the index of whatever data the section represents. Some elements exist across multiple elements, such as the set of all indexes. To represent an index for those, we sort all tables by their name (ascending) and iterate over each table's indexes as though it were a single contiguous array.
The size of each bit section is malleable, so I've made some guesses at what sensible starting values may be. In addition, I've disabled the ability to save tables with regclass and regproc, even though Postgres officially supports them. Since we do not yet have a permanent OID solution, I felt that it wouldn't be wise to allow persisting such values to disk, since changing the OID algorithm would break all such databases.
482: /.github/scripts/performance-benchmarking/get-postgres-doltgres-job-json.sh: add additional tests to results
481: Added IN to indexes select_random_points is performing slower than expected, and this is due to IN not using indexes. This just adds IN to the index logic, so that select_random_points will now actually use indexes. This logic does not properly reflect how PostgreSQL should really behave, but currently none of the index logic behaves properly due to GMS requiring exact type matches, rather than relying on comparison operators, so there's no additional harm in adding this.
No new tests are added, as we already have pre-existing tests for IN using indexes. They just didn't actually use the index, but still returned the correct result, and now they're using the index as well.
475: Added function support for polymorphic types
This adds the types anyelement and anynonarray, in addition to adding support for defining functions that use polymorphic types. https://www.postgresql.org/docs/15/extend-type-system.html#EXTEND-TYPES-POLYMORPHIC
Besides the changes to function resolution, this also adds a new parameter so that functions can see which types are passed in. This also cleans up the function interface, so that function definitions are a little more consistent and slightly less prone to typos (such as changing function parameters to an array from a slice, so that the length must be defined).
471: Release v0.10.0
Created by the Release workflow to update DoltgreSQL's version
461: Fixed quoting in enginetest queries
Automatically fix quoting in engine test query strings