Configures the MD5 hash string of a raster object.

Syntax

text ST_SetMD5Sum(raster raster_obj, text md5sum)

Parameters

Parameter Description
raster_obj The name of the raster object.
md5sum The MD5 hash string of the raster object.

Description

This function records the MD5 hash string in the metadata of the raster object. The MD5 hash string must be 32 characters in length and can only contain digits and lowercase letters.

The following table describes the parameters that you need to configure.

Parameter Type Description
ganos.raster.calculate_md5 boolean Specifies whether to calculate the MD5 hash string and saves it to the metadata when the raster object is stored. Valid values: true | false. Default value: false. Example:
Set ganos.raster.calculate_md5 = true;

Examples

SELECT ST_MD5SUM(ST_SetMD5Sum(rast,'21f41fd983d3139c75b04bff2b7bf5c9'))
FROM raster_table
WHERE id = 1;

              st_md5sum
-----------------------------------
 21f41fd983d3139c75b04bff2b7bf5c9