NavigationContentFooter
Jump toSuggest an edit

Supported PostgreSQL extensions

Reviewed on 08 October 2024Published on 08 October 2024

Serverless SQL Databases support the most popular PostgreSQL extensions. Due to autoscaling and built-in connection pooling, some advanced features of extensions might be limited or require workarounds.

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • Created a Serverless SQL Database

Install an extension

  1. Connect to your Serverless SQL Database with a PostgreSQL client (such as psql):

    psql "postgres://[user-or-application-id]:[api-secret-key]@[database-hostname]:5432/[database-name]?sslmode=require"
  2. Run the following command to create an extension using SQL:

    CREATE EXTENSION extension_name;
  3. Use the supported features of the extension. For instance, if you installed pgvector with CREATE EXTENSION vector, you can create a vector and query it:

    CREATE TABLE songs (id bigserial PRIMARY KEY, embedding vector(3));
    INSERT INTO songs (embedding) VALUES ('[1,1,1]'), ('[2,2,2]'), ('[0,1,2]');
    SELECT * FROM songs ORDER BY embedding <-> '[3,3,3]' LIMIT 5;

    This example will find the nearest vectors (using L2 distance) from ‘[3,3,3]‘:

    id | embedding
    ----+-----------
    2 | [2,2,2]
    1 | [1,1,1]
    3 | [0,1,2]

Supported extensions

The following PostgreSQL extensions are available with Serverless SQL Databases:

ExtensionDescription and known limitations
address_standardizerParses addresses into their constituent elements, typically used in the geocoding normalization process.
address_standardizer_data_usProvides a dataset example for the US Address Standardizer extension.
bloomImplements a Bloom filter-based index, ideal for situations where space efficiency is crucial.
btree_ginAdds support for indexing common data types using the GIN (Generalized Inverted Index) method.
btree_gistAdds support for indexing common data types using the GiST (Generalized Search Tree) method.
citextProvides a case-insensitive character string data type for easier text comparison.
cubeDefines a data type for representing multidimensional cubes, useful in mathematical and geometrical computations.
dict_intOffers a text search dictionary template optimized for integer values.
dict_xsynProvides a text search dictionary template for advanced synonym processing, improving search accuracy. Features requiring direct access to the filesystem will not be supported (eg. custom synonym lists).
earthdistanceCalculates great-circle distances between points on Earth, useful in geographical applications.
fuzzystrmatchDetermines similarities and differences between strings, helpful for tasks like data deduplication.
hstoreStores sets of key-value pairs in a single value, enabling a flexible schema for semi-structured data.
intaggAggregates and enumerates integer values, though it is considered obsolete since PG 8.4, and official support has been integrated in PostgreSQL directly
intarrayProvides functions, operators, and indexing support for one-dimensional arrays of integers, enhancing array processing.
isnSupports data types for international product numbering standards, such as ISBN and EAN.
ltreeDefines a data type for representing tree-like structures in a hierarchical manner, facilitating complex data modeling.
pg_cronSchedules jobs within PostgreSQL using a cron-like syntax, automating routine database tasks. pg_cron requires the database to be in an active state permanently, and thus that you provision at least one vCPU for the extension to properly work.
pg_prewarmPreloads relation data into memory to reduce initial disk I/O latency and improve performance.
pg_stat_statementsTracks planning and execution statistics for all SQL statements, aiding in performance tuning.
pg_trgmMeasures text similarity and provides index searching based on trigrams, enhancing text search capabilities.
pgcryptoProvides cryptographic functions for data encryption, decryption, and hashing, essential for secure data storage.
pgroutingExtends PostgreSQL and PostGIS with geospatial routing capabilities, enabling the calculation of shortest paths and other routing operations.
pgrowlocksDisplays information about row-level locking, helping in the diagnosis of concurrency issues.
pgvectorSupports vector similarity search, often used for storing and searching embeddings in machine learning applications. Query options using SET command require to be used in a single transaction (i.e. between BEGIN; (...) COMMIT;)
plpgsqlEnables the use of PL/pgSQL, a procedural language for PostgreSQL that allows complex control structures and query manipulation.
postgisAdds support for geographic objects, allowing location queries to be run in SQL, and is the foundation of the geographic information system (GIS) functionality in PostgreSQL.
postgis_rasterImplements raster data support in PostGIS, enabling analysis and storage of raster images alongside vector data.
postgis_sfcgalAdds advanced 3D geometry functions to PostGIS, leveraging the SFCGAL library for complex spatial operations.
postgis_tiger_geocoderProvides geocoding and reverse geocoding capabilities based on the US Census TIGER data within PostGIS.
postgis_topologySupports topological data models in PostGIS, allowing for advanced spatial relationships and analyses.
tablefuncOffers functions for manipulating entire tables, including crosstab operations for pivot tables.
timescaledbEnables efficient handling and analysis of time-series data, extending PostgreSQL with specialized time-series functions.
tsm_system_rowsImplements a TABLESAMPLE method that limits the number of rows returned, useful for sampling large datasets.
tsm_system_timeImplements a TABLESAMPLE method that limits rows based on a time duration, useful for time-based sampling.
unaccentProvides a text search dictionary that removes accents from characters, improving text search accuracy.
uuid-osspGenerates universally unique identifiers (UUIDs), essential for ensuring data uniqueness across distributed systems.
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway