# Gel v6

To explore the new features, ensure you specify version 6.0 when initializing your project. Pre-release versions are not considered stable and will not be automatically suggested:

```bash
$ gel project init --server-version 6.0-rc.2
```

## Upgrading

**Local instances**

To upgrade a local project, first ensure that your CLI is up to date with `gel cli upgrade`. Then run the following command inside the project directory.

```bash
$ gel project upgrade --to-testing
```

Alternatively, specify an instance name if you aren't using a project:

```bash
$ gel instance upgrade -I my_instance
```

The CLI will check if your schema can migrate cleanly to Gel 6.0. If any issues are found, they will be reported.

**Hosted instances**

To upgrade a remote instance, we recommend the following dump-and-restore process:

1. Gel v6.0 supports PostgreSQL 14 or above. Verify your PostgreSQL version before upgrading Gel. If you're using Postgres 13 or below, upgrade Postgres first.

2. Spin up an empty 6.0 instance. You can use one of our [deployment guides](https://docs.geldata.com/reference/running/deployment.md#ref-guide-deployment).
   
   For Debian/Ubuntu, when adding the Gel package repository, use this command:
   
   ```bash
   $ echo deb [signed-by=/usr/local/share/keyrings/gel-keyring.gpg] \
       https://packages.geldata.com/apt \
       $(grep "VERSION_CODENAME=" /etc/os-release | cut -d= -f2) main \
       | sudo tee /etc/apt/sources.list.d/gel.list
   $ sudo apt-get update && sudo apt-get install gel-6
   ```
   
   For CentOS/RHEL, use this installation command:
   
   ```bash
   $ sudo yum install gel-6
   ```
   
   In any required `systemctl` commands, replace `edgedb-server-5` with `gel-server-6`.
   
   For Docker setups, use the `6.0` tag.

3. Take your application offline, then dump your v5.x database with the CLI:
   
   ```bash
   $ gel dump --dsn <old dsn> --all --format dir my_database.dump/
   ```
   
   This will dump the schema and contents of your current database to a directory on your local disk called `my_database.dump`. The directory name isn't important.

4. Restore the empty v6.x instance from the dump:
   
   ```bash
   $ gel restore --all my_database.dump/ --dsn <new dsn>
   ```
   
   Once the restore is complete, update your application to connect to the new instance.
   
   This process will involve some downtime, specifically during steps 2 and 3.


## New features

### SQL write support

You can now use SQL DML (`insert`, `update`, `delete`) when connecting to your Gel instance via the PostgreSQL protocol. Our aim is to support most typical use cases from tools like SQL ORMs and SQL clients.

This allows more developers to use Gel, leveraging our advanced data model, tooling, and high-performance connection management. Teams can migrate their existing SQL codebases to Gel without rewriting their queries. Once adopted, you can gradually take advantage of EdgeQL's powerful query capabilities.

Existing Gel users who already use EdgeQL can benefit too. While some SQL features like window functions, recursive queries, and explicit locking are not yet supported, you can use these features in SQL today. We will continue to add support for more features in the future.

### In-place upgrade

We aim for this version to be the last requiring a full dump and restore process for major version upgrades. We understand that dump-and-restore is disruptive, so enabling in-place upgrades will make it easier for teams to upgrade more frequently.

### Query performance observability

We now store statistics about query performance. These statistics are available in `sys::QueryStats` objects.

```edgeql
select sys::QueryStats {
  query,
  queryType,
  tag,
  plans,
  total_plan_time,
  mean_plan_time,
  calls,
  total_exec_time,
  mean_exec_time,
} filter .branch.name = sys::get_current_branch();
```

More details to come in the reference documentation.

### ext::postgis

We've added support for the popular PostGIS extension for PostgreSQL. This extension adds support for geographic objects and spatial data types.

### std::net

We've introduced a new standard library module for sending network requests, initially supporting HTTP. This module schedules asynchronous requests and allows you to poll for responses.

### ext::auth

We've introduced several new features to our authentication extension:

- You can now configure generic OpenID Connect providers.
- If using an OAuth provider that returns an `id_token` (like an OpenID Connect compatible provider), you will now receive that validated token in your callback. This simplifies using some of that data for your own User or Profile objects, saving a roundtrip to the identity provider.

- As an alternative (or in addition) to configuring SMTP for sending emails, you can now configure a webhook for various authentication lifecycle events. Use these webhooks to send custom emails, update analytics, or trigger other workflows.

- Previously, a missing PKCE session during email verification was treated as an error. Now, we support verifying end-user emails from a different device than the one used to start the sign-up or sign-in process. To enable verification without PKCE, direct the end-user to attempt a login after verifying their email, which will initiate a new flow.
  
  Previously, the application couldn't identify which identity was being created during sign-up until email verification was successful. When verification occurred on the same device, it concluded with an auth token, allowing the creation of a new `User` based on that token's identity. With the new process, where users are directed to sign in after email verification, there's no clear distinction between a regular sign-in (which shouldn't create a new `User`) and an interrupted sign-up (which should create a new `User`). To address this, we now return an `identity_id` in the sign-up response, enabling you to create a `User` type before the email is verified.

- We now configure a development-only SMTP provider for instances hosted on our Cloud. This SMTP proxy is heavily rate limited, and requires a fixed sender email address. It is intended to be used for development and testing purposes. Once you're ready to start sending real emails, you can configure your own SMTP provider. We hope this will make it easier to get started with a simple email-based authentication flow during early development.

- Handle multiple WebAuthn email factors. ([#7861](https://github.com/edgedb/edgedb/issues/7861))
- Add logs to `auth` extension. ([#7944](https://github.com/edgedb/edgedb/issues/7944))
- Migrate `ext::auth::SMTPConfig` to `cfg::EmailProvider`. ([#7942](https://github.com/edgedb/edgedb/issues/7942))
- Allow Magic Link to specify a custom link URL. ([#8030](https://github.com/edgedb/edgedb/issues/8030))
- Do not fail if SMTP provider is not configured. ([#8228](https://github.com/edgedb/edgedb/issues/8228))

**Breaking changes**

- We have moved our SMTP configuration into a new top-level `cfg::SMTPProviderConfig` configuration object. During the upgrade process, your existing SMTP configuration will be migrated to this new object. If you have any scripts that configure SMTP directly, update them to use the new object.


### ext::ai

- We've updated the built-in list of models from our first-party LLM providers to match the latest offerings from OpenAI, Anthropic, and Mistral.

- We now pass LLM configuration query parameters through to the downstream provider.
- Add delays to AI embeddings requests based on rate limits provided by provider.
- Allow specifying underlying vector dimensions when creating an index. ([#8068](https://github.com/edgedb/edgedb/issues/8068))

### Simpler scoping rules

We've simplified the scoping rules for queries. See [our RFC 1027 outlining the changes](https://github.com/geldata/rfcs/blob/master/text/1027-no-factoring.rst).

The RFC highlights two main reasons for removing path factoring: the need to simplify and enhance the language, and concerns about implementation. Path factoring is complex and makes it hard to quickly understand a query's behavior. It also undermines several key design principles of EdgeQL. Although EdgeQL is intended to be read from top to bottom, path factoring allows later parts of a query to change its meaning significantly.

By default in 6.0, we will generate new schemas that opt-in to the new scoping rules. Existing schemas will continue to use the old rules and emit warnings when queries that trigger the old behavior are encountered at query time.

### Command Hooks

We've added hooks for `gel` CLI operations. Certain operations like switching branches or applying migrations have a profound effect on the state of the database. These types of changes may occasionally need to be synchronized with the rest of the project codebase. Whether it's a need to re-run some schema introspection tools or some fixture validation or re-generation tools, we now have a way to add hooks that will automatically execute after certain commands in your project.

These hooks are declared in the gel.toml file. For example:

```default
[hooks]
schema.update.after="scripts/extract_schema_docs.sh"
```

This would run `scripts/extract_schema_docs.sh` script any time the schema changes (whether due to branch switch or applying a migration). In this example the script is meant to introspect the schema annotations and automatically generate some documentation files used in the project. But the mechanism is flexible enough to be used for automating a variety of project tasks.

See [our RFC 1028 for more details on the changes](https://github.com/edgedb/rfcs/blob/master/text/1028-cli-hooks.rst).

### File Watchers

We've also added a way to respond to certain file changes within a project. The gel.toml now supports `[[watch]]` configuration to specify the files being watched and the script to be executed when changes occur. In order to enable this mode the `gel` `watch` command is used.

For example, the following configuration will watch for changes in the queries files and automatically attempt to re-generate the functions that allow executing these queries in a type-safe way:

```default
[[watch]]
files = ["queries/*.edgeql"]
script = "npx @edgedb/generate queries"
```

Multiple `[[watch]]` entries can be added to the gel.toml file, so that you can fine-tune how your project responds to important file changes.

This changes how `watch` command functions. By default, `gel watch` will start the watch process and monitor files specified in gel.toml. In order to access the old functionality of `edgedb watch` (which was monitoring schema file changes and automatically applying them to the database) you now need to run `gel watch --migrate`.

See [our RFC 1028 for more details on the changes](https://github.com/edgedb/rfcs/blob/master/text/1028-cli-hooks.rst).

## Additional changes

### EdgeQL

- Free objects no longer have an `id` property. This is a breaking change, though we expect the real-world impact to be minor. If you need a dynamically generated new ID for free objects, it can be added manually, using one of our UUID generation functions.
  
  ```edgeql
  select {
      id := uuid_generate_v1mc(),
      property := 'Some string',
  }
  ```

- Add `__default__` keyword to refer to default value. ([#7214](https://github.com/edgedb/edgedb/issues/7214))
  
  This keyword allows referring to the default value in `insert` and `update` statements. For example, consider the following schema:
  
  ```sdl
  type Item {
      name: str { default := 'New item' }
  }
  ```
  
  We can then insert a 'New item #1' by using the `__default__` value:
  
  ```edgeql-repl
  db> insert Item {name := __default__ ++ ' #1'};
  {default::Item {id: ebcfff62-eb91-11ef-a6b9-5ffb2f0b2940}}
  db> select Item{name};
  {default::Item {name: 'New item #1'}}
  ```

- Add support for type expressions in intersections. ([#7172](https://github.com/edgedb/edgedb/issues/7172))
  
  Allow using `&` and `|` in expressions like this:
  
  ```edgeql
  select Shape[is Circle | Triangle & HasRightAngle];
  ```

- Add array modifying functions [`array_set()`](https://docs.geldata.com/reference/stdlib/array.md#function::std::array_set) and [`array_insert()`](https://docs.geldata.com/reference/stdlib/array.md#function::std::array_insert). ([#7427](https://github.com/edgedb/edgedb/issues/7427))

- Add trigonometry functions. ([#8071](https://github.com/edgedb/edgedb/issues/8071))
  
  Add [`math::pi()`](https://docs.geldata.com/reference/stdlib/math.md#function::math::pi), [`math::acos()`](https://docs.geldata.com/reference/stdlib/math.md#function::math::acos), [`math::asin()`](https://docs.geldata.com/reference/stdlib/math.md#function::math::asin), [`math::atan()`](https://docs.geldata.com/reference/stdlib/math.md#function::math::atan), [`math::atan2()`](https://docs.geldata.com/reference/stdlib/math.md#function::math::atan2), [`math::cos()`](https://docs.geldata.com/reference/stdlib/math.md#function::math::cos), [`math::cot()`](https://docs.geldata.com/reference/stdlib/math.md#function::math::cot), [`math::sin()`](https://docs.geldata.com/reference/stdlib/math.md#function::math::sin), [`math::tan()`](https://docs.geldata.com/reference/stdlib/math.md#function::math::tan).

- Allow `update` and `delete` on type intersections. ([#7655](https://github.com/edgedb/edgedb/issues/7655))
  
  Given types `A`, `B`, and `C`, allows expressions such as:
  
  ```edgeql
  update A[is B & C]
  set { foo := 123 }
  ```

- Implement `\(expr)`-style string interpolation. ([#8210](https://github.com/edgedb/edgedb/issues/8210))
  
  This enables the following expression:
  
  ```edgeql-repl
  db> select "1 + 1 = \(1 + 1)"
  {'1 + 1 = 2'}
  ```

- Allow complex types as function params. ([#7759](https://github.com/edgedb/edgedb/issues/7759))
  
  Allow functions such as:
  
  ```sdl
  function foo(x: A | B) -> int64 using (x.n);
  ```

- Search `std` for module name when using `with` clause. ([#7753](https://github.com/edgedb/edgedb/issues/7753), [#7836](https://github.com/edgedb/edgedb/issues/7836), [#7743](https://github.com/edgedb/edgedb/issues/7743))
  
  We've consolidated many of the built-in modules as sub-modules under the `std` umbrella.

- Support accessing link properties through [`for`](https://docs.geldata.com/reference/reference/edgeql/for.md#statement::for) bindings. ([#7805](https://github.com/edgedb/edgedb/issues/7805))
  
  Now you can write something like this:
  
  ```edgeql
  select User {
      cards := ((
          for c in .deck[is HeartsCard]
          select (c.name, c@order)
      )),
  }
  ```

- Enable DML in user-defined functions. ([#7945](https://github.com/edgedb/edgedb/issues/7945))
  
  It is now possible to create this kind of function:
  
  ```sdl
  function add_foo(x: int64) -> Foo using ((
      insert Foo { val := x }
  ));
  ```
  
  A new `Modifying` volatility level is introduced to represent this. ([#7808](https://github.com/edgedb/edgedb/issues/7808))

- Support `drop extension package` of user-installed extensions. ([#7926](https://github.com/edgedb/edgedb/issues/7926))
- Warn when a `filter` clause has `Many` cardinality. ([#8089](https://github.com/edgedb/edgedb/issues/8089))
- Mark [`assert_exists()`](https://docs.geldata.com/reference/stdlib/set.md#function::std::assert_exists), [`assert_single()`](https://docs.geldata.com/reference/stdlib/set.md#function::std::assert_single), and [`assert_distinct()`](https://docs.geldata.com/reference/stdlib/set.md#function::std::assert_distinct) functions as being `Immutable`. ([#8292](https://github.com/edgedb/edgedb/issues/8292))

- Expose `administer statistics_update()`. ([#8335](https://github.com/edgedb/edgedb/issues/8335))

### Other changes

- Require extension modules to live in `ext::`. ([#7526](https://github.com/edgedb/edgedb/issues/7526))
- Use LRU/MRU to improve connection re-use. ([#7583](https://github.com/edgedb/edgedb/issues/7583))
- Change how globals affect internal alias names that may appear in introspection. ([#7641](https://github.com/edgedb/edgedb/issues/7641))
- Rename `sys::Database` to `sys::Branch`. ([#7653](https://github.com/edgedb/edgedb/issues/7653))
- Add `std::net` and `std::net::http` modules. ([#7676](https://github.com/edgedb/edgedb/issues/7676), [#7736](https://github.com/edgedb/edgedb/issues/7736))

- Add `sys::Branch.last_migration`. ([#7654](https://github.com/edgedb/edgedb/issues/7654))
- Record SDL in `schema::Migration` object. ([#7673](https://github.com/edgedb/edgedb/issues/7673))
- Get `std::net::http` max connections from config. ([#7767](https://github.com/edgedb/edgedb/issues/7767))
- Add extension `ext::pg_unaccent`. ([#7741](https://github.com/edgedb/edgedb/issues/7741))
- Implement warnings in the server. ([#7823](https://github.com/edgedb/edgedb/issues/7823))
- Update the `ext::pgvector` extension. ([#7812](https://github.com/edgedb/edgedb/issues/7812))
  
  Add `sparcevec` and `halfvec` types and update indexes and operators.

- Avoid computing globals json if not needed for inlined function. ([#7920](https://github.com/edgedb/edgedb/issues/7920))
- Allow volatile `with` in DML statements. ([#7969](https://github.com/edgedb/edgedb/issues/7969))
- Make `admin` the default role instead of `edgedb`. ([#8010](https://github.com/edgedb/edgedb/issues/8010))
- Support extension upgrades. ([#7998](https://github.com/edgedb/edgedb/issues/7998))
- Replace headers with annotations in Parse/Execute. ([#8037](https://github.com/edgedb/edgedb/issues/8037))
- Add TOML config file support. ([#8121](https://github.com/edgedb/edgedb/issues/8121))
- Allow tuples in GIN, GIST and BRIN indexes. ([#8232](https://github.com/edgedb/edgedb/issues/8232))
- Add a `cors-always-allowed-origins` option. ([#8233](https://github.com/edgedb/edgedb/issues/8233))

### Bug fixes

- Tweak parser to correctly report certain missing semicolons. ([#7252](https://github.com/edgedb/edgedb/issues/7252))
- Fix regression in using some tuple literals as a default. ([#7281](https://github.com/edgedb/edgedb/issues/7281))
- Fix handling of enums in arrays and multi properties in GraphQL. ([#3990](https://github.com/edgedb/edgedb/issues/3990))
- Improve error message when casting to collections. ([#7300](https://github.com/edgedb/edgedb/issues/7300))
- Improve [`json`](https://docs.geldata.com/reference/stdlib/json.md#type::std::json) cast error messages. ([#7312](https://github.com/edgedb/edgedb/issues/7312))

- Improve error when accessing a non-existent tuple field. ([#7373](https://github.com/edgedb/edgedb/issues/7373))
- Fix an ISE on some specific operations with arrays. ([#7363](https://github.com/edgedb/edgedb/issues/7363))
- Catch illegal aggregate calls in constraints and indexes during `migration create`. ([#7343](https://github.com/edgedb/edgedb/issues/7343))
- Raise error when computed `global` is set or reset. ([#7374](https://github.com/edgedb/edgedb/issues/7374))
- Improve error messages for casts, [`is`](https://docs.geldata.com/reference/stdlib/type.md#operator::is), and [`introspect`](https://docs.geldata.com/reference/stdlib/type.md#operator::introspect). ([#7351](https://github.com/edgedb/edgedb/issues/7351))

- Fix recursive definition error when computed property refers to different object's computed property. ([#7431](https://github.com/edgedb/edgedb/issues/7431))

- Fix issue with abstract types, exclusive constraints, and `analyze`. ([#7454](https://github.com/edgedb/edgedb/issues/7454))
- Fix an issue with deletion policies affecting properties. ([#7675](https://github.com/edgedb/edgedb/issues/7675))
- Fix errors when resolving type intersections. ([#7662](https://github.com/edgedb/edgedb/issues/7662))
- Fix issues with `branch` commands that arise from network issues. ([#7773](https://github.com/edgedb/edgedb/issues/7773))
- Fix a regression involving optional arguments and [`assert_exists()`](https://docs.geldata.com/reference/stdlib/set.md#function::std::assert_exists). ([#7798](https://github.com/edgedb/edgedb/issues/7798))

- Include more information in HTTP protocol errors. ([#7817](https://github.com/edgedb/edgedb/issues/7817))
- Raise error when passing multi cardinality args to modifying functions. ([#7816](https://github.com/edgedb/edgedb/issues/7816))
- Fix an issue with cardinality of [`json`](https://docs.geldata.com/reference/stdlib/json.md#type::std::json) parameters. ([#7843](https://github.com/edgedb/edgedb/issues/7843))

- Encode offset positions as integers in json error encoding. ([#7842](https://github.com/edgedb/edgedb/issues/7842))
- Make `configure current database` block until configuration is actually set. ([#7865](https://github.com/edgedb/edgedb/issues/7865))
- Fix shape not being copied when inlining parameters. ([#7872](https://github.com/edgedb/edgedb/issues/7872))
- Garbage collect `std::net::http::ScheduleRequest`. ([#7888](https://github.com/edgedb/edgedb/issues/7888))
- Fix error when dropping non overloaded function. ([#7899](https://github.com/edgedb/edgedb/issues/7899))
- Fix embedding data being stored with the wrong entry. ([#7932](https://github.com/edgedb/edgedb/issues/7932))
- Fix an obscure bug deleting doubly nested alias tuples. ([#7956](https://github.com/edgedb/edgedb/issues/7956))
- Fix an schema issue with deleting collections. ([#7957](https://github.com/edgedb/edgedb/issues/7957))
- Automatically create array types for all scalars to avoid introspection issues. ([#7970](https://github.com/edgedb/edgedb/issues/7970))
- Fix an edge case of calling value functions from range vars. ([#7982](https://github.com/edgedb/edgedb/issues/7982))
- Fix ISE when enumerating a call to an aggregate function. ([#7988](https://github.com/edgedb/edgedb/issues/7988))
- Fix free objects being materialized as if they are volatile. ([#8000](https://github.com/edgedb/edgedb/issues/8000))
- Fix aliases always being considered `Immutable`. ([#8009](https://github.com/edgedb/edgedb/issues/8009))
- Fix ISE when taking intersection of types with pointers of the same name. ([#8012](https://github.com/edgedb/edgedb/issues/8012))
- Fix static types in subtypes under `sysconfig`. ([#8054](https://github.com/edgedb/edgedb/issues/8054))
- Fix extension package installation on non `--testmode` servers. ([#8096](https://github.com/edgedb/edgedb/issues/8096))
- Fix cache key of source. ([#8103](https://github.com/edgedb/edgedb/issues/8103))
- Fix handling of invalid link properties. ([#8156](https://github.com/edgedb/edgedb/issues/8156))
- Delete old `.s.EDGEDB.admin.XXX` sockets. ([#8248](https://github.com/edgedb/edgedb/issues/8248))
- Fix broken error messages for type mismatches in a number of schema objects. ([#8294](https://github.com/edgedb/edgedb/issues/8294))
- Don't emit instance configs matching their defaults in `describe instance config`. ([#8316](https://github.com/edgedb/edgedb/issues/8316))

## 6.1

- Report migration count and object count as metrics ([#8369](https://github.com/edgedb/edgedb/issues/8369))
- Increase recursion limit in compiler worker processes. This should fix dumps in some cases. ([#8379](https://github.com/edgedb/edgedb/issues/8379))


## 6.2

- Fix systemd service descriptions in distro packages
- Fix tagging SQL over binary protocol ([#8371](https://github.com/edgedb/edgedb/issues/8371))
- Improve error message for $0 over SQL adapter ([#8388](https://github.com/edgedb/edgedb/issues/8388))
- Fix referencing `ext::auth::ClientTokenIdentity` from a link default ([#8394](https://github.com/edgedb/edgedb/issues/8394))
- Add default value for `ai::EmbeddingModel::embedding_model_max_batch_tokens` ([#8406](https://github.com/edgedb/edgedb/issues/8406))
- Prevent ai extension connecting to branch being dropped ([#8416](https://github.com/edgedb/edgedb/issues/8416))
- Fix `ON TARGET DELETE ALLOW` behavior when link optionality is changed ([#8419](https://github.com/edgedb/edgedb/issues/8419))
- Fix server error when trying to register a new WebAuthn identity in the auth extension ([#8428](https://github.com/edgedb/edgedb/issues/8428))

- Fix schema reflection losing track of changes made while `using future` ([#8435](https://github.com/edgedb/edgedb/issues/8435))
- Use correct docker repository when checking tags ([#8407](https://github.com/edgedb/edgedb/issues/8407))
- Fix parser span over SQL adapter ([#8399](https://github.com/edgedb/edgedb/issues/8399))
- Fix `IS` when the left-hand side is not just a path ([#8410](https://github.com/edgedb/edgedb/issues/8410))

## 6.3

- Make `std::net` polling output quieter ([#8450](https://github.com/edgedb/edgedb/issues/8450))
- Fix regression with `UPDATE` on a complex path with rewrite ([#8463](https://github.com/edgedb/edgedb/issues/8463))
- Make free objects always considered UNIQUE. This also fixes a regression seen when using `assert_distinct` on free objects. ([#8464](https://github.com/edgedb/edgedb/issues/8464))

- Fix regression when using `fts::index` and certain inheritance patterns ([#8468](https://github.com/edgedb/edgedb/issues/8468))
- Fix function cache storage of queries that take enum parameters ([#8471](https://github.com/edgedb/edgedb/issues/8471))

## 6.4

- Use `read committed` when restoring dumps to improve restore performance ([#8496](https://github.com/edgedb/edgedb/issues/8496))
- Use `COPY ... FREEZE` when restoring dumps to improve restore performance ([#8494](https://github.com/edgedb/edgedb/issues/8494))
- pg-ext: add table name parsing in `has_*privilege` functions and fix `pg_database` view ([#8488](https://github.com/edgedb/edgedb/issues/8488), fixes [#8457](https://github.com/edgedb/edgedb/issues/8457))

- Fixed computed ptr with group by incorrectly inferring multiplicity ([#8485](https://github.com/edgedb/edgedb/issues/8485), regression from [#8464](https://github.com/edgedb/edgedb/issues/8464) in 6.3)


## 6.5

### Major changes

- Allow DML in REPEATABLE READ transactions, but only when it is safe to do. Performing DML in REPEATABLE READ transactions is safe as long as the query does not affect exclusive constraints that are shared between multiple types (through inheritance). ([#8561](https://github.com/edgedb/edgedb/issues/8561))


### Features

- Update bundled PostgreSQL to version 17.4 ([#8543](https://github.com/edgedb/edgedb/issues/8543))
- Send a LogMessage to the client about query cache recompilation ([#8540](https://github.com/edgedb/edgedb/issues/8540), [#8552](https://github.com/edgedb/edgedb/issues/8552))

- Support ON CONFLICT over SQL adapter ([#8560](https://github.com/edgedb/edgedb/issues/8560), [#8587](https://github.com/edgedb/edgedb/issues/8587), [#8595](https://github.com/edgedb/edgedb/issues/8595))


### Fixes

- Fix SQL introspection on old PostgreSQL versions ([#8501](https://github.com/edgedb/edgedb/issues/8501))
- Make HTTP requests delay the auto shutdown ([#8506](https://github.com/edgedb/edgedb/issues/8506))
- Prevent server auto shutdown during building AI index ([#8507](https://github.com/edgedb/edgedb/issues/8507))
- pg_ext: fix `to_regclass()`, `::regclass` and `pg_settings` ([#8511](https://github.com/edgedb/edgedb/issues/8511))
- pg_ext: information_schema.columns.ordinal_position should be int ([#8550](https://github.com/edgedb/edgedb/issues/8550))
- Add replication to pg_hba and wal summarization ([#8556](https://github.com/edgedb/edgedb/issues/8556))
- Fix UPDATE and DELETE on types that use inheritance over SQL adapter ([#8562](https://github.com/edgedb/edgedb/issues/8562))
- Abort tenant initialization with incompatible backend ([#8569](https://github.com/edgedb/edgedb/issues/8569))
- Fix computed link properties over SQL adapter ([#8158](https://github.com/edgedb/edgedb/issues/8158))
- Fix backlinks in computeds over SQL adapter ([#8570](https://github.com/edgedb/edgedb/issues/8570))
- Fix access policies SELECT issue with diamond-pattern inheritance ([#8572](https://github.com/edgedb/edgedb/issues/8572))
- Fix dropping types in some situations where the type is used in a function ([#8574](https://github.com/edgedb/edgedb/issues/8574))
- Fix AI ext OpenAI streaming ([#8553](https://github.com/edgedb/edgedb/issues/8553))
- Fix removal of path factoring breaking ai embedding views. ([#8576](https://github.com/edgedb/edgedb/issues/8576))
- Fix a cross-type conflict bug that can occur with rewrites ([#8584](https://github.com/edgedb/edgedb/issues/8584))
- Optimize compilation in transactions ([#8082](https://github.com/edgedb/edgedb/issues/8082))
- Fix memory leak in pgrust-pgcon ([#8590](https://github.com/edgedb/edgedb/issues/8590))
- Fix CREATE … BRANCH FROM … when source uses ai extension ([#8594](https://github.com/edgedb/edgedb/issues/8594))

## 6.6

Due to an error in our release infrastructure, 6.6 was inadvertently released from our master branch (commit 7db665af18d22d90d5ec682159353552c67ce1c5).

It has been removed from our package servers, and was never available in our cloud.

If you have a 6.6 instance, you will need to perform a dump and restore to upgrade to 6.7. We apologize for the inconvenience.

## 6.7

### Features

- Add text search to ai extension. `ext::ai::search()` may now be called with string search parameters, instead of only arrays of floats. The string must be a constant or a query parameter. The AI provider will be queried to convert the string to a an embedding vector. ([#8521](https://github.com/edgedb/edgedb/issues/8521))

- Add Ollama support. ([#8646](https://github.com/edgedb/edgedb/issues/8646))

### Fixes

- Fix wrong values for multi links in triggers and some other places ([#8615](https://github.com/edgedb/edgedb/issues/8615))
- Fix `SET GLOBAL` when right hand side needs to use access policies ([#8619](https://github.com/edgedb/edgedb/issues/8619))
- Fix proto hang running script after setting `default_transaction_*` ([#8623](https://github.com/edgedb/edgedb/issues/8623))
- Avoid hanging onto Schema objects with lru_caches ([#8628](https://github.com/edgedb/edgedb/issues/8628))
- Enable queries with server param conversions to be cached. ([#8598](https://github.com/edgedb/edgedb/issues/8598))
- Fix ISE when with binding in dml function contains a set function/operator ([#8634](https://github.com/edgedb/edgedb/issues/8634))
- Only run the net worker query when DML has happened on the branch ([#8637](https://github.com/edgedb/edgedb/issues/8637))
- Fix our optimization for skipping optional checks based on card inference ([#8647](https://github.com/edgedb/edgedb/issues/8647))
- Try to optimize away a per-object check in access policies ([#8650](https://github.com/edgedb/edgedb/issues/8650))
- Fix access policies warnings when `future warn_old_scoping` exists ([#8643](https://github.com/edgedb/edgedb/issues/8643))
- Fix some object-returning functions when using `future warn_old_scoping` ([#8653](https://github.com/edgedb/edgedb/issues/8653))
- server: add cached branch limit to the compiler pool ([#8621](https://github.com/edgedb/edgedb/issues/8621))
- server: add `--compiler-worker-max-rss` ([#8627](https://github.com/edgedb/edgedb/issues/8627))
- server: add more compiler pool metrics ([#8655](https://github.com/edgedb/edgedb/issues/8655))
- compiler server: add envvar to click options ([#8666](https://github.com/edgedb/edgedb/issues/8666))
- Start invalidating evicted cache entries on other frontends ([#8638](https://github.com/edgedb/edgedb/issues/8638))
- Fix error when using computed pointer in ai index. ([#8663](https://github.com/edgedb/edgedb/issues/8663))
- Fix a bug in COPY with inheritance over SQL adapter ([#8668](https://github.com/edgedb/edgedb/issues/8668))
- Fix exponential time (in inheritance depth) migrations when altering things ([#8671](https://github.com/edgedb/edgedb/issues/8671))

## 6.8

- Fix having unnecessary constraint triggers after restore ([#8685](https://github.com/edgedb/edgedb/issues/8685))
- Fix bogus warnings when using certain functions in access policies ([#8712](https://github.com/edgedb/edgedb/issues/8712))
- Re-disable doing certain UPDATEs on just INSERTed objects ([#8713](https://github.com/edgedb/edgedb/issues/8713))
- Fix `administer schema_repair()` ([#8730](https://github.com/edgedb/edgedb/issues/8730))
- Fix `IN` when left hand side is a SQL NULL ([#8737](https://github.com/edgedb/edgedb/issues/8737))
- Do better multiplicity inference in nested `FOR` expressions ([#8754](https://github.com/edgedb/edgedb/issues/8754))
- Add json implementation for `to_bytes` function. ([#8723](https://github.com/edgedb/edgedb/issues/8723))
- Speed up use of globals from graphql and http endpoints via caching ([#8753](https://github.com/edgedb/edgedb/issues/8753))
- Cache param conversion in HTTP and graphql endpoints ([#8795](https://github.com/edgedb/edgedb/issues/8795))
- Fix issue with some recursive triggers ([#8775](https://github.com/edgedb/edgedb/issues/8775))
- Fix interaction between inlining, globals, and the HTTP protocols ([#8781](https://github.com/edgedb/edgedb/issues/8781))
- Fix some situations where `__tid__` wasn't appearing first ([#8783](https://github.com/edgedb/edgedb/issues/8783))
- Fix the command status of BEGIN in the SQL protocol, which should fix JDBC connections ([#8794](https://github.com/edgedb/edgedb/issues/8794))

- Add a test case for mutation rewrites ([#8589](https://github.com/edgedb/edgedb/issues/8589))
- Fix `FOR` + `UPDATE` + rewrite interaction ([#8796](https://github.com/edgedb/edgedb/issues/8796))
- Improve system API responsiveness ([#8477](https://github.com/edgedb/edgedb/issues/8477))
- Send `IdentityCreated` webhook for OAuth sign up ([#8799](https://github.com/edgedb/edgedb/issues/8799))
- Use provided callback URL in OAuth code exchange ([#8801](https://github.com/edgedb/edgedb/issues/8801))
- Fix rewrites making `UPDATE` infer as `ONE` ([#8800](https://github.com/edgedb/edgedb/issues/8800))
- Increase performance of array/json indexing and json to scalar casts ([#8804](https://github.com/edgedb/edgedb/issues/8804))

## 6.9

- Fix array-of-tuple parameter decoding with empty arrays from some bindings ([#8816](https://github.com/edgedb/edgedb/issues/8816))
- Improve performance of array-of-tuple query parameters ([#8818](https://github.com/edgedb/edgedb/issues/8818))
- Improve some parser error messages ([#8819](https://github.com/edgedb/edgedb/issues/8819))

## 6.10

- Fix casting from JSON in indexes/constraints ([#8920](https://github.com/edgedb/edgedb/issues/8920))
- Fix ISE when computed global is introspected using GraphQL. ([#8839](https://github.com/edgedb/edgedb/issues/8839))
- Fix policy object duplication in degenerate multiple inheritance cases ([#8881](https://github.com/edgedb/edgedb/issues/8881))
- Fix bad HTTP cache response when cache expires and upstream is not modified ([#8891](https://github.com/edgedb/edgedb/issues/8891))
- Fix accessing single link properties through FOR bindings ([#8911](https://github.com/edgedb/edgedb/issues/8911))
- Fix UPDATING a link table field with reference to non-link field in some cases ([#8912](https://github.com/edgedb/edgedb/issues/8912))
- Add `administer fixup_backend_upgrade()` command for repairing certain support views after a separately managed Postgres backend has been upgraded. ([#8926](https://github.com/edgedb/edgedb/issues/8926))

- pg-ext: fix bug in query reparse ([#8938](https://github.com/edgedb/edgedb/issues/8938))
- Fix updating of two single links with linkprops at once ([#8932](https://github.com/edgedb/edgedb/issues/8932))

## 6.11

- Improve auth email headers and alt content ([#8919](https://github.com/edgedb/edgedb/issues/8919))
- Fix SQL `COLLATE` clauses that require quotation ([#8960](https://github.com/edgedb/edgedb/issues/8960))
- Improve SQL adapter fallback for `has_column_privilege` ([#8962](https://github.com/edgedb/edgedb/issues/8962))
- Fix introspection of `cfg::AuthMethod.transports` ([#8971](https://github.com/edgedb/edgedb/issues/8971))
- Fix referencing a computed from a conversion `USING` expression ([#8981](https://github.com/edgedb/edgedb/issues/8981))
- Fix `FOR` iteration over a set of DML expressions ([#8994](https://github.com/edgedb/edgedb/issues/8994))
- Fix casting to multi-ranges accidentally aggregating ([#8995](https://github.com/edgedb/edgedb/issues/8995))
- Fix `__default__` when nested statements have defaults ([#9006](https://github.com/edgedb/edgedb/issues/9006))
- Bump the compatible extension version for pgvector. ([#9028](https://github.com/edgedb/edgedb/issues/9028))

