Version 5.0.0¶
Released on 2022-07-11.
Note
If you are upgrading a cluster, you must be running CrateDB 4.0.2 or higher before you upgrade to 5.0.0.
We recommend that you upgrade to the latest 4.8 release before moving to 5.0.0.
A rolling upgrade from 4.8.x to 5.0.0 is supported. Before upgrading, you should back up your data.
Warning
Tables that were created before CrateDB 4.x will not function with 5.x and must be recreated before moving to 5.x.x.
You can recreate tables using COPY TO and COPY FROM or by
inserting the data into a new table.
Table of Contents
Breaking Changes¶
Updated Lucene to the version 9.2.0.
Changed the type of TIMESTAMP from TIMESTAMP WITH TIME ZONE to TIMESTAMP WITHOUT TIME ZONE to be compatible with the SQL standard.
Tables created prior to updating to CrateDB 5.0 will remain unchanged. Tables created after updating to 5.0 while using the
TIMESTAMPalias will useTIMESTAMP WITHOUT TIME ZONE. Change the type definition toTIMESTAMP WITH TIME ZONEif you want to preserve the old behavior.Creating tables with soft deletes disabled is no longer supported. The setting soft_deletes.enabled will always be set to
trueand removed in CrateDB 6.0.Removed deprecated
node.max_local_storage_nodessetting. Set different path.data values to run multiple CrateDB processes on the same machine.Removed deprecated
delimited_payload_filterbuilt-in token filter which has been renamed todelimited_payloadsince CrateDB 3.2.0.Removed
simplefsstore type as a follow-up of its removal in Lucene 9.0.0. Refer to store types for alternatives.Changed the default column name for the
generate_series,regexp_matchesandunnesttable functions. Previously they’d default tocol1as column name. The behavior changed to use the table function’s name as column name unless the function returns more than one column. Some examples:cr> SELECT * FROM generate_series(1, 2);This used to return a column named
col1and now returns a column namedgenerate_series.cr> SELECT * FROM generate_series(1, 2) as numbers;This used to return a column named
col1and now returns a column namednumbers.
To ease migration, we added a new setting (legacy.table_function_column_naming.) to opt-out of this new behavior.
Fields of type
pg_node_treein PostgreSQL in thepg_classandpg_indextables now returnTEXTinstead ofARRAY(OBJECT)for improved compatibility with PostgreSQL.The single byte
bytedata type was falsely exposed as thechardata type. It will now be correctly exposed as the special single byte"char".
Deprecations¶
Deprecated the azure discovery functionality. It only works for classic VM and Microsoft deprecated classic VM support on Azure.
Changes¶
SQL Statements¶
Added support for non-recursive WITH Queries (Common Table Expressions).
Added support for using subscript expressions on top of aliases within the
ORDER BYclause. An example:SELECT percentile(x, [0.90, 0.95]) AS percentiles FROM tbl ORDER BY percentiles[1].Added support for array element access on top of a subscript on an object array. An example:
object_array['subelement'][1]Added support for casts from
biginttoregclassfor improved compatibility with PostgreSQL clients.Added support for
FETCH [FIRST | NEXT] <noRows> [ROW | ROWS] ONLYclause as and alternative to theLIMITclause.Allowed
LIMITandOFFSETclauses to be declared in any order, i.e.:SELECT * FROM t LIMIT 10 OFFSET 5orSELECT * FROM t OFFSET 5 LIMIT 10.Added support for
LIMIT NULL,LIMIT ALL,OFFSET NULL,OFFSET 10 ROWandOFFSET 10 ROWS.Added support for using
NULLliterals in aUNIONwithout requiring an explicit cast.Changed
UNIONto support implicit casts if the type of expressions in the first relation don’t match the types in the second relation.
New Types¶
Added full support, incl. storage and indexing, for the fixed-length, blank padded CHARACTER(n) data type. Previously, the single byte
bytewas exposed ascharwhich has been fixed, see Breaking Changes.Added
decimaltype as alias tonumeric
SQL Standard And PostgreSQL Schema Compatibility¶
Added
typsendcolumn topg_catalog.pgtypetable for improved compatibility with PostgreSQL.Added primary key and check constraint column positions into
conkeyfield of thepg_constrainttable for improved compatibility with PostgreSQL.Added
pg_catalog.pg_tablesandpg_catalog.pg_viewstables for improved PostgreSQL compatibility.Added identity columns information to
information_schema.columnstable for improved PostgreSQL compatibility. CrateDB does not support identity columns.Added an empty
pg_catalog.pg_shdescriptiontable for improved PostgreSQL compatibility.
Scalar Functions¶
Added
SUBSTRINGto the non-reserved SQL keywords in order to support the generic function call syntax for improved PostgreSQL compatibility. Example:SUBSTRING('crate', 1, 3)Added the concat_ws scalar function which allows concatenation with a custom separator.
Added the object_keys scalar function which returns the set of first level keys of an
object.Added the pg_get_serial_sequence scalar function for improved compatibility with PostgreSQL. CrateDB does not support sequences.
Added has_schema_privilege scalar function which checks whether user (or current user if not specified) has specific privilege(s) for the specific schema.
Added support for an optional boolean argument
prettyat the pg_get_expr scalar function for improved PostgreSQL compatibility.Added the pg_get_partkeydef scalar function for improved compatibility with PostgreSQL. Partitioning in CrateDB is different from PostgreSQL, therefore this function always returns
NULL.Moved the quote_ident(text) function to
pg_catalogfor improved compatibility with PostgreSQL.
Performance Improvements¶
Added an optimization to push down constant join conditions to the relation in an inner join, which results in a more efficient execution plan.
Added an optimization for
array_column = []queries.
Administration and Operations¶
Updated the bundled JDK to 18.0.1+10
Users with AL privileges can now run
ANALYZEUpdated the Admin UI. It includes a new color, new colors and no longer loads resources like web fonts from external services.