Cannot upgrade/restore ArcGIS 10.5.1 geodatabase/PostgreSQL 9.5 to ArcGIS 10.6/PostgreSQL 9.6 when ST_RASTER is installed

Last Published: July 21, 2023


The ST_RASTER SQL type was deprecated after the 10.5.1 release. However, its assemblies currently exist in PostgreSQL databases, as the type was installed into the database at a previous release. For PostgreSQL, the following error may be encountered while running the pg_restore utility to restore the sde schema:

[archiver (db)] could not execute query: ERROR:  function sde.subset(sde.st_raster, text, text) does not exist

The Solution section below provides a method to remove the ST_RASTER type and its supporting functions from the geodatabase.


The ST_RASTER type was installed into the database at a previous release. This error occurs if the sde schema contains the deprecated ST_RASTER type.

 There are no known reports of errors that have occurred due to the presence of the ST_RASTER type in SQL Server or Oracle databases.


  1. Perform a file system level backup. Refer to the PostgreSQL Documentation for instructions:
    File System Level Backup
  2. Use this ArcGIS Desktop document to convert raster data from the ST_RASTER storage type to the RASTERBLOB storage type:
    Convert raster data from ST_Raster to RASTERBLOB storage
  3. Remove all raster datasets from the database that have a column with an ST_RASTER type.
  4. Use this SQL statement to verify that no columns of type ST_RASTER remain in the geodatabase:
select relname from pg_class where oid = (select attrelid from pg_attribute where atttypid = (select oid from pg_type where typname = 'st_raster'))
  1. Connect to the database as the geodatabase administrator, and execute the SQL statements provided in the attached file in the Related Information section below to remove the ST_RASTER type and functions.
    Cut and paste the statements in the attachment into a file and execute them as a script in your PostgreSQL SQL utility.
  2. Create a new dump file and restore it using pg_dump and pg_restore to verify that the database can be cleanly backed up and restored without error.

Article ID:000019239

  • ArcMap

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options