Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex MPP Analytics for PostgreSQL
  • Getting started
    • All guides
    • Connecting to an external file server (gpfdist)
      • Managing extensions
      • gp_relaccess_stats
      • gp_relsizes_stats
      • gp_url_tools
      • pgcrypto
      • try_convert
      • uuid-cb
      • Yezzey
    • Auxiliary utilities
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Installing try_convert in a Greenplum® cluster
  • Use cases
  1. Step-by-step guides
  2. Greenplum® extensions
  3. try_convert

Using try_convert in Yandex MPP Analytics for PostgreSQL

Written by
Yandex Cloud
Updated at March 5, 2026
  • Installing try_convert in a Greenplum® cluster
  • Use cases

try_convert is a Yandex Cloud extension which works in the same way as the TRY_CONVERT function and converts data from one type to another. This extension enables type conversions when there are errors in the input data. Without try_convert, such conversions are performed in pl/pgsql, resulting in increased CPU consumption.

The extension only supports the standard Greenplum® data types. To use other data types, add them using the add_type_for_try_convert function.

Here is an example:

SELECT add_type_for_try_convert('hstore'::regtype);

For more information about the extension, see this try_convert guide.

Installing try_convert in a Greenplum® clusterInstalling try_convert in a Greenplum® 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 try_convert;
    
  2. Make sure the extension has been installed:

    SELECT extname FROM pg_extension;
    

    This will bring up the list of extensions installed in the database.

Use casesUse cases

  1. Convert text that is convertible to a number:

    SELECT TRY_CONVERT('42'::text, 0::int2);
    

    The returned result is 42.

  2. Convert text that is not convertible to a number:

    SELECT TRY_CONVERT('42d'::text, 1234::int2);
    

    The returned result is 1234.

Was the article helpful?

Previous
pgcrypto
Next
uuid-cb
© 2026 Direct Cursus Technology L.L.C.