---
title: Known differences between Serverless SQL Databases and PostgreSQL
description: Identify key differences between Scaleway's serverless SQL databases and traditional SQL setups.
tags: database serverless-sql-database differences postgresql serverless
dates:
  validation: 2025-09-02
  posted: 2023-08-04
---

Serverless SQL Database is based on PostgreSQL engine, and thus provides standard PostgreSQL compatibility for most PostgreSQL features and commands. Due to the nature of a managed service, autoscaling support and connection pooling support, some features are currently not supported. This means either the corresponding SQL command will not be authorized, or will not behave similarly to a standard PostgreSQL instance.

If you require strict compatibility with all PostgreSQL features, you can use [Managed Databases for PostgreSQL](/managed-databases-for-postgresql-and-mysql/quickstart/) instead.

## Unsupported PostgreSQL extensions

Serverless SQL Databases support the most popular PostgreSQL extensions. Refer to the [dedicated documentation](/serverless-sql-databases/reference-content/supported-postgresql-extensions/) for more information. 

## Unsupported SQL features

- Notifying and listening channels using the `NOTIFY` and `LISTEN` commands can be performed, but message delivery is not guaranteed.

    ```sql
    LISTEN channel;
    NOTIFY channel, 'message';
    ```

- It is not possible to create temporary tables or views.

    ```sql
    CREATE TEMPORARY TABLE table as {query};
    CREATE TEMPORARY VIEW view as {query};
    ```

- Refreshing materialized view concurrently cannot be performed.

    ```sql
    REFRESH MATERIALIZED VIEW CONCURRENTLY view
    ```

    <Message type="note">
    You can still refresh materialized views without the `CONCURRENTLY` option.
    </Message>

- You can declare a cursor in transactions with `WITH HOLD`, but accurate cursor handling is not guaranteed, particularly when using multiple connections.

    ```sql
    BEGIN;
    DECLARE cursor CURSOR WITH HOLD FOR {query};
    COMMIT;
    ```

- Creating subscriptions cannot be performed.

    ```sql
    CREATE SUBSCRIPTION subscription CONNECTION 'connection' PUBLICATION publication;
    ```

- It is not possible to prepare transactions.

    ```sql
    PREPARE TRANSACTION 'transactionid';
    ```

- Discarding all session states using the `DISCARD ALL` command is possible, but results are not guaranteed. Specifically, some session state variables might be kept if multiple SQL clients perform operations concurrently.

    ```sql
    DISCARD ALL;
    ```

- `pg_advisory_lock` command can be used, but the lock is not guaranteed. Consequently, third-party tools that use this feature, such as Terraform/OpenTofu when storing [Terraform/OpenTofu state using pg backend](https://developer.hashicorp.com/terraform/language/settings/backends/pg), are not fully supported. State locking is not guaranteed if multiple Terraform/OpenTofu clients edit the same state concurrently.

    ```sql
    SELECT * FROM pg_advisory_lock(1);
    ```

## Unsupported SQL client features

- Grafana: Serverless SQL Databases cannot be added as a PostgreSQL data source in Grafana 10.1 and older versions, as Server Name Indication (SNI) is not supported. However, this feature is supported by Grafana 10.2 or higher.

- r2dbc-postgresql (Java): Serverless SQL Databases cannot be queried with `r2dbc-postgresql` client version before 1.0.5, as Server Name Indication (SNI) is not supported. However, this feature is supported by r2dbc-postgresql 1.0.5. As a consequence, Java frameworks using this client are also limited depending on which client version they use. For instance, **Micronaut** framework before version 4.4.1 cannot query Serverless SQL Databases using `micronaut-r2dbc`/`r2dbc-postgresql`, but can however perform queries using standard `jdbc` client.

- vertx-sql-client (Java): Serverless SQL Databases cannot be queried with `vertx-sql-client` yet.

- The `client_encoding` option can only be set to `UTF8` or `UNICODE`:
    ```sql
    pgcli postgresql://{username}:{password}@{host}:{port}/{databasename}?client_encoding=UTF8|UNICODE
    ```
    Setting the client-side encoding to a different value, such as `SQL_ASCII` when connecting with a client is not supported.

- ETL tools such as Airbyte, Fivetran or Meltano cannot load data into a Serverless SQL Database, as they require `TEMPORARY TABLES`, which are currently not supported. However, data can be loaded from a Serverless SQL Database into another target, but not using Change Data Capture (CDC) options, as they require `SUBSCRIPTIONS`, which are currently not supported. To import data into a Serverless SQL Database, refer to the [dedicated documentation](/serverless-sql-databases/api-cli/import-data-to-serverless-sql-databases/).

- Terraform/OpenTofu: Storing [Terraform/OpenTofu states using pg backend](https://developer.hashicorp.com/terraform/language/settings/backends/pg) can be done, but terraform state locking when multiple Terraform/OpenTofu clients are editing the same state concurrently is not guaranteed (since this guarantees rely on `pg_advisory_lock` command usage, which is not supported currently).

## Unsupported configuration commands

- DDL (Data Definition Language) queries on objects such as databases and users cannot be performed. Corresponding actions can still be performed directly using the [Scaleway console](https://console.scaleway.com/), the API, Terraform/OpenTofu, and [IAM](https://console.scaleway.com/iam/users).

    ```sql
    CREATE/UPDATE/DELETE DATABASE database;
    CREATE/UPDATE/DELETE USER username;
    GRANT SELECT ON TABLE table TO role;
    REVOKE SELECT ON TABLE table FROM role;
    ```

- `SET` or `RESET` commands to change run-time configuration parameters can be performed, but will be shared across multiple clients and might be lost when a database switches to an idle state, or during autoscaling operations.

    ```sql
    SET TIME ZONE 'Europe/Paris';
    RESET timezone;
    ```
    If you require these features to work consistently for a given SQL query, we suggest you set them in transactions:
    ```sql
    BEGIN;
      SET TIME ZONE 'Europe/Paris';
      SHOW timezone;
    COMMIT;
    ```
    In this example, `SHOW timezone` will always display `Europe/Paris` without any impact from any other connection despite connection pooling.

- `SET search_path TO` commands to use schemas works, but will be shared across multiple clients due to connection pooling, and will lead to unwanted effects. Refer to the [dedicated troubleshooting page](/serverless-sql-databases/troubleshooting/search-path-schema-errors/) for more information.

- Security labels cannot be defined or changed.

    ```sql
    SECURITY LABEL FOR provider ON TABLE table IS 'label';
    ```
