GanosBase is a spatio-temporal database engine that is developed by Alibaba Cloud. GanosBase provides a wide range of data types, functions, and stored procedures. This topic describes how to update the GanosBase plug-ins on an ApsaraDB RDS instance.
Each GanosBase plug-in is identified by the word Ganos in the description of the Ganos plug-in. To find and update the GanosBase plug-ins that you installed, perform the following steps:
Use the PostgreSQL CLI to connect to your RDS instance.
Run the
\dx
command to view all plug-ins that you installed.Information similar to the following command output is displayed:
List of installed extensions Name | Version | Schema | Description ------------------------------------+---------+------------+--------------------------------------------------------------------------------------------------------------------- address_standardizer | 2.5.4 | public | Ganos PostGIS+ address standardizer address_standardizer_data_us | 2.5.4 | public | Ganos PostGIS+ address standardizer data us ganos_address_standardizer | 4.1 | public | Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. ganos_address_standardizer_data_us | 4.1 | public | Address Standardizer US dataset example ganos_geometry | 4.1 | public | Ganos geometry extension for PostgreSQL ganos_geometry_sfcgal | 4.1 | public | Ganos geometry SFCGAL functions extension for PostgreSQL ganos_geometry_topology | 4.1 | topology | Ganos geometry topology spatial types and functions extension for PostgreSQL ganos_networking | 4.1 | public | Ganos networking extension for PostgreSQL ganos_spatialref | 4.1 | public | Ganos spatial reference extension for PostgreSQL ganos_tiger_geocoder | 4.1 | tiger | Ganos tiger geocoder and reverse geocoder plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language postgis | 2.5.4 | public | Ganos PostGIS+ postgis_sfcgal | 2.5.4 | public | Ganos PostGIS+ postgis_tiger_geocoder | 2.5.4 | public | Ganos PostGIS+ tiger geocoder postgis_topology | 2.5.4 | public | Ganos PostGIS+ topology
View the information about each plug-in in the Description column of the command output to find the GanosBase plug-ins that you want to update.
NoteIf the description of a plug-in includes the word Ganos, the plug-in is a GanosBase plug-in.
Update the Ganos plug-ins.
If the Ganos plug-ins are in version 3.1 or later, execute the following statement to update all Ganos plug-ins:
SELECT ganos_update();
If the GanosBase plug-ins are in versions earlier than 3.1, create a function to update all GanosBase plug-ins. The following code snippet is an example:
CREATE OR REPLACE FUNCTION ganos_update() RETURNS text AS $$ DECLARE rec RECORD; sql text; BEGIN FOR rec IN SELECT extname FROM pg_extension WHERE extname like 'ganos_%' LOOP sql = 'ALTER EXTENSION ' || rec.extname || ' UPDATE '; RAISE NOTICE '%', sql; EXECUTE sql; END LOOP; return 'All Ganos extensions have updated to latest version'; END $$ LANGUAGE 'plpgsql' volatile STRICT;
NoteThe method of updating the GanosBase plug-ins is different from the method of updating other plug-ins. To update a different plug-in, you can execute the following statement:
ALTER EXTENSION <Plug-in name> UPDATE;