Removes the pyramid from a raster object, resets its metadata, and deletes the associated chunk data.
Syntax
raster ST_deletePyramid(raster source);Parameters
| Parameter | Type | Description |
|---|---|---|
| source | raster | The raster object from which to delete the pyramid. |
Description
ST_deletePyramid performs three operations on the raster object:
Deletes the pyramid
Resets the metadata
Deletes the chunk data
Examples
The following example retrieves a raster object from a table, removes its pyramid, and saves the updated object back to the table.
DO $$
declare
rast raster;
begin
select raster_obj into rast from raster_table where id = 1;
rast = ST_deletePyramid(rast);
update raster_table set raster_obj = rast where id = 1;
end;
$$ LANGUAGE 'plpgsql';