Releases: dolthub/doltgresql
Releases · dolthub/doltgresql
0.54.10
Merged PRs
doltgresql
- 2199: Support multiple statements
This allows for handling multiple statements within a singleQuerymessage. This fixes:- #2175
This also tests the contents of the messages returned, which were verified using Wireshark on a local Postgres instance as the source-of-truth.
- #2175
- 2190: Initial support for UDFs with
RETURNS SETOF
Adds support for user-defined functions that useRETURNS SETOFto return values of a composite type.
Support for UDFs that useRETURNS TABLEto return an anonymous composite type will be added as a follow up.
Closed Issues
- 2174: Error: DISTINCT ON is not yet supported
0.54.9
Merged PRs
doltgresql
- 2181: Added DISTINCT ON handling
This adds support for:- #2174
Related PRs: - dolthub/vitess#446
- dolthub/go-mysql-server#3369
- #2174
Closed Issues
0.54.8
Merged PRs
doltgresql
- 2172: drop schema support
Fixes #2159 - 2158: Added bit and bit varying types
Fixes #2149 - 2152: Bug fix: allow
bpchar(N)casting
Fixes: #2145 - 2151: Correctly support empty messages
Fixes #2147 - 2139: #1863: validate database exists before CREATE SCHEMA
Summary
Adds aValidateCreateSchemaanalyzer rule to ensureCREATE SCHEMAfails that appropriately when executed against a non-existent or invalid database context.- Adds analyzer rule that checks if the current database has a valid root before allowing
CREATE SCHEMAto proceed - Ensures PostgreSQL-compliant behavior where schemas must be created within an existing database
- Adds integration and bats tests
Note
I wasn't 100% sure if adding an analyzer rule was the right approach here, but it seemed like the cleanest way to validate database context before schema creation. The rule follows the same pattern as existing validation rules likeValidateCreateTable.
The connection-level validation (rejecting connections to non-existent databases) already handles most cases, but this analyzer rule acts as an additional safety net for edge cases where a query might run with an invalid database context (also not sure how realistic this is 😕 ).
Open to feedback on whether there's a better approach!Testing
- Integrationt: TestCreateSchemaWithNonExistentDatabase
- Bats:
bats --filter "non-existent database|CREATE SCHEMA works" testing/bats/doltgres.bats - Existing schema tests pass:
go test ./testing/go/... -run TestSchemas -v
Closes: #1863
- Adds analyzer rule that checks if the current database has a valid root before allowing
- 2138: #1361: unskip dolt_clean zero-argument tests
Summary
- Unskips the
SELECT DOLT_CLEAN()zero-argument smoke tests that were added in #1373 - I believe the underlying issue was resolved in #1763 which added
Function0registration for all Dolt procedures - Reorders test assertions so
DOLT_CLEAN('t1')runs beforeDOLT_CLEAN()to properly test both
Note: #1373 also added skipped tests inprepared_statement_test.go, but those were already unskipped in commit 62569c7.
Tests to verify
- Run
go test ./testing/go/... -run "TestDoltClean"to verify existing dolt_clean tests pass - Run
go test ./testing/go/... -run "TestDoltFunctionSmokeTests/smoke_test_select_dolt_clean"to verify unskipped smoke tests pass
Fixes #1361
- Unskips the
- 2137: #1868: remove outdated skip list entries for OR index tests
Summary
Remove outdated skip list entries for tests that were previously panicking due to an OR condition index lookup bug. The underlying issue was fixed in PR #2123.What was the problem?
Issue #1868 reported a panic when executing queries like:where the first condition matches an index (primary key) and the second doesn't.SELECT * FROM test WHERE pk1 = 1 OR i = 1;
What fixed it?
I believe PR #2123 fixed this issue. In the PR it implemented aLogicTreeWalkerfor DoltgreSQL that properly handles doltgres-specific expression nodes when analyzing filters. This allows the query optimizer to correctly handle OR expressions with mixed indexed/non-indexed columns.Changes in this PR
Removed 3 entries from the engine test skip list:Complex Filter Index Scan #2Complex Filter Index Scan #3complicated range tree
All three tests now pass.
Testing
- 2136: #1057 allow unquoted STATUS keyword in DESCRIBE statements
IMPORTANT
Below is the summary of the cause of the bug in #1057 and the simple fix, but I want to clarify this is the desired fix.Summary
- Fixes
DESCRIBE dolt.statusfailing with "at or near 'status': syntax error" - Adds
STATUSto thesimple_identgrammar rule insql.y, following the pattern established forPUBLICin PR #828 - Enables the previously skipped test for this functionality
Background
Thesimple_identrule is used for parsing table name components in DESCRIBE statements. It only allowedIDENTtokens and the explicitly addedPUBLICkeyword. SinceSTATUSis an unreserved keyword (not a regular identifier), the parser rejected it unless quoted.
Before:DESCRIBE dolt.statusfails,DESCRIBE dolt."status"works
After: Both workTest Plan
DESCRIBE dolt.statustest now passes (TestUserSpaceDoltTables/dolt_status)
Fixes #1057 - Fixes
- 2126: Add tests for
SHOW TABLESbug
Adds a test for a bug inSHOW TABLESbehavior that caused sequences to be included in returned results.
Depends on: dolthub/dolt#10220
Fixes: #1743
Closed Issues
- 2149: bit type is not supported
- 2159: Please complete the implementation for dropping a schema in Doltgres
- 2099: [RFC] Exploring feasibility of Dolt or Doltgres as backend fo Matrix homeserver
- 1743: SHOW TABLES should not show sequences
- 2145: PostgreSQL compat: select '1'::bpchar(1) fails
- 2147: PostgreSQL compatibility: status field for empty query should be EMPTY
- 1359: Error adding a column with a check constraint to table with data
- 1361:
dolt_cleanprocedure does not work if no arguments provided - 1863: Handle PostgreSQL CREATE SCHEMA error when no database is selected
- 1057:
describe dolt.statusdoesn't work - 1868: Panic on SELECT ... WHERE ... OR
- 2127: JSONB SELECT Panic for large objects ~2KB
0.54.7
Merged PRs
doltgresql
- 2132: Fixed JSONB extended value error
Fixes the issue: - 2128: Added some hooks for DROP TABLE
This adds support for ensuring that dropping a table while using table types doesn't outright put the database in an unusable state. There are many more hooks that need to be implemented across the board, but these are relatively straightforward ones for a common case of dropping a table, function, or procedure that uses them.
This also adds support forDROP PROCEDURE, which I apparently overlooked when adding procedure support in general. Lastly, this adds support for the serialization and deserialization of values within columns that use table types. While it was previously possible to create tables that use table types, it wasn't possible to read from those tables (and writing to them just wrote useless data that couldn't be removed).
You'll notice that error messages involving procedures return "function" instead of "procedure". Postgres calls them functions in their error messages, so we're replicating that. - 2125: Changed configuration file for function passing
In a nutshell, our internal repository for handling Hosted Doltgres only needs to include the configuration file, however recent changes added more packages that were referenced from ourservercfgpackage. As our internal repository wasn't configured to handle these additional packages (which essentially requires building the entirety of Doltgres), it broke the existing workflow. To workaround this, I've moved the "details" of the configuration to its own package (namedcfgdetails), and that will be referenced by our internal repository. Elsewhere in Doltgres, we still refer toservercfg, which has a wrapper struct around our details.
The wrapper is needed as we cannot store a field that contains the overrides on the struct itself. Our YAML deserialization function does not honor ignored fields (which are supposed to work usingyaml:"-") and is therefore panicking. Instead, the wrapper declares its ownOverrides()function that overrides the function withincfgdetails. - 2123: Bug fix: ensure OR expressions on a single table use an index when possible
This fixes the performance regression in select_random_ranges, which usesBETWEEN .. OR BETWEEN ..in its filters.
Requires dolthub/go-mysql-server#3347
Closed Issues
0.54.6
Merged PRs
doltgresql
- 2108: typo preventing release version from getting to docker push workflow
- 2107: added another function stub
- 2106: Fixed issue #2097
This fixes - 2093: remove doltgres index implementation, various bug fixes
Companion PRs:- dolthub/go-mysql-server#3334
- dolthub/dolt#10184
This removes the custom index logic Doltgres was using, and fixes many bugs and incompatibilities that were causing the Dolt index logic to not work correctly in the first place.
- 2009: Tables as types
Related PRs:
Closed Issues
0.54.5
Merged PRs
doltgresql
- 2102: Set the default DB from the
DOLTGRES_DBuser var
Fixes #2100 - 2091: added MetricsJwksConfig() stub
- 2089: updated readme
- 2068: Fix Doltgres and Dolt authentication and system table compatibility
Companion dolthub/dolt#10159- Add
SUPERUSERauthentication for generated Dolt procedure callables forSELECTstatements. - Remove Dolt procedures from
CALLstatements. - Add
adapters.TableAdapterfordolt_statussystem table to handle type change in Dolt due to a limitation with the MySQL protocol in distinguishing Booleans. - Add
paramscolumn in thepgcatalogtable fordolt_backupsrecent changes. - Add extensive suite of
_go.ScriptTestfor Dolt procedure authentication testing in Doltgres. - Add support to run local file system tests by setting flag in
_go.ScriptTestfor new tests. Some procedures require this because some Noms functions useospackage calls for directory writes instead of thefilesyspackage.
- Add
Closed Issues
- 2100:
DOLTGRES_DBenvironment variable isn't respected
0.54.4
0.53.6
Merged PRs
doltgresql
- 2069: /{Dockerfile,.dockerignore}: some tweaks
- 2067: Fixed timestamp replication
This fixes the two issues found in- #2060
The first was that replication was incorrectly formatting timestamp values, so now we bypass it and use the returned time strings directly. The second was that we hadAmerica/Los_Angeleshardcoded as the parameter value, and in some cases we would ignore the local timezone and use the parameter value. Now, we default the parameter value to the local as well.
- #2060
Closed Issues
- 2049: SyntaxError: Bad control character in string literal in JSON
0.53.5
Merged PRs
doltgresql
- 2055: Fixed Issue #2049
This fixes the following PR:- #2049
At its core, our JSON parsing libraries (bothgo-jsonand the internaljsonpackages) replace binary escape sequences (\n,\t,\r) with their ASCII byte replacements, which doesn't mirror what Postgres clients expect (that the binary representation is preserved). This extends to our testing framework as well, so this also adds raw byte comparisons for testing.
- #2049
- 2047: updated README
Also cleaned up some leftover dolt typos in install.sh
Closed Issues
- 2030: Drizzle relational query fails with BigInt error
0.53.4
Merged PRs
doltgresql
- 2041: Fixed a couple issues with prepared statements
This PR addresses a couple issues discovered by a customer working with the Drizzle ORM- Literals in LIMIT statements were being inappropriately flagged as invalid when they appeared in subqueries
- Bindvars in ON CONFLICT clauses were not being handled correctly
Fixes #2030
- 2038: add metrics tls param to the server config
- 2036: Another attempt at install.sh
Closed Issues
- 2030: Drizzle relational query fails with BigInt error