This function creates a raster object based on Alibaba Cloud Object Storage Service (OSS).


raster ST_CreateRast(cstring url);


Parameter Description
url The path of OSS raster files.


The path of OSS files is in the following format: oss://access_id:secrect_key@endpoint/path_to/file. The endpoint parameter can be omitted, and the system automatically finds the corresponding endpoint. If the endpoint parameter is omitted, the path must start with a forward slash (/).

The endpoint is the address used to access OSS. To properly import data, make sure that the PolarDB instance is in the same region as the OSS bucket. For more information, see OSS endpoints.


-- Specifies the AccessKey ID, AccessKey secret, and endpoint based on OSS.
Select ST_CreateRast('OSS://');

-- Specifies the AccessKey ID and AccessKey secret based on OSS.
Select ST_CreateRast('OSS://ABCDEFG:1234567890@/mybucket/data/4.tif');

-- Specifies the URL in HTTPS format based on OSS. AccessKey-based access has better performance than URL-based access.
Select ST_CreateRast('');