Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex MPP Analytics for PostgreSQL
  • Getting started
    • All guides
    • Connecting to an external file server (gpfdist)
    • Access from Trino
      • Managing extensions
      • gp_relaccess_stats
      • gp_relsizes_stats
      • gp_url_tools
      • pgcrypto
      • try_convert
      • uuid-cb
      • Yezzey
    • Auxiliary utilities
  • Access management
  • Inspections and recommendations
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Installing the gp_url_toolsextension in a Yandex MPP Analytics for PostgreSQL cluster
  • Use cases
  1. Step-by-step guides
  2. Extensions
  3. gp_url_tools

Using gp_url_tools in Yandex MPP Analytics for PostgreSQL

Written by
Yandex Cloud
Updated at July 6, 2026
View in Markdown
  • Installing the gp_url_toolsextension in a Yandex MPP Analytics for PostgreSQL cluster
  • Use cases

Warning

Apache Cloudberry™ does not support this extension.

The gp_url_tools extension enables you to encode URLs/URIs into a format supported by web browsers and to decode them back to the original format:

  • encode_url(text): Encoding a URL.
  • decode_url(text): Decoding a URL.
  • encode_uri(text): Encoding a URI.
  • decode_uri(text): Decoding a URI.

Installing the extension in a Yandex MPP Analytics for PostgreSQL clusterInstalling the gp_url_toolsextension in a Yandex MPP Analytics for PostgreSQL cluster

  1. Connect to the database as the owner or a user with the CREATE permission in the database and run this command:

    CREATE EXTENSION gp_url_tools;
    

    Installing the extension creates a schema named url_tools_schema and adds encoding and decoding functions to it.

  2. Make sure the extension has been installed:

    SELECT extname FROM pg_extension;
    

Use casesUse cases

  1. Create a table named companies:

    CREATE TABLE companies (
        id int NOT NULL,
        name varchar (50),
        site text,
        contact text,
        PRIMARY KEY (id)
    );
    
  2. Insert data into the table:

    INSERT INTO companies VALUES
        (1, ‘Sever-1', 'http://север-1.рф/новости', 'mailto:офис@север-1.рф'),
        (2, ‘East Coast', 'east-coast.ru/about', 'mailto:sale@east-cost.ru');
    
  3. Encode the website and email addresses:

    UPDATE companies SET 
        site = url_tools_schema.encode_url(site),
        contact = url_tools_schema.encode_uri(contact);
    
  4. Check the result:

    SELECT name, site, contact FROM companies;
    
  5. Decode the website and email addresses:

    UPDATE companies SET 
        site = url_tools_schema.decode_url(site),
        contact = url_tools_schema.decode_uri(contact);
    
  6. Check the result:

    SELECT name, site, contact FROM companies;
    

Apache® and Apache Cloudberry™ are registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.

Was the article helpful?

Previous
gp_relsizes_stats
Next
pgcrypto
© 2026 Direct Cursus Technology L.L.C.