yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.99k stars 1.07k forks source link

[YSQL] postgis_topology - ERROR: ALTER DOMAIN ADD CONSTRAINT not supported yet #17294

Open pancutan opened 1 year ago

pancutan commented 1 year ago

Jira Link: DB-6519

Description

In a CentOS Linux release 7.9.2009 (Core)

  1. Install by executing all steps in https://docs.yugabyte.com/preview/deploy/manual-deployment/

Installation completed in /root/yugabyte-2.16.2.0

Service started with bin/yugabyted start

  1. Check UI get running, insert some data examples, etc - everything is fine.

  2. Install postgis extension as menction in https://docs.yugabyte.com/preview/explore/ysql-language-features/pg-extensions/#postgis-example

  3. Enter ysqlsh as usual:

`bin/ysqlsh -h <ip>  -U yugabyte -d yugabyte`

yugabyte=# CREATE EXTENSION postgis;
ERROR:  extension "postgis" already exists (I dont have original message, but is working with example data provided in the same documentation)

yugabyte=# CREATE EXTENSION postgis_topology;
ERROR:  ALTER DOMAIN ADD CONSTRAINT not supported yet
HINT:  Please report the issue on https://github.com/YugaByte/yugabyte-db/issues

Other things I tried

Added postgis flags --ysql_pg_conf_csv in bin/yugabyted script, as saw in https://github.com/radekg/yugabyte-db-multi-tenant-paas-demo/blob/master/.env-postgis#L2:

        yb_master_cmd = [find_binary_location("yb-master")] + \
            common_gflags + \
            [
                "--rpc_bind_addresses={}:{}".format(bind_ip, master_rpc_port),
                "--server_broadcast_addresses={}:{}".format(advertise_ip, master_rpc_port),
                "--replication_factor=1",
                "--use_initial_sys_catalog_snapshot",
                "--server_dump_info_path={}".format(
                    os.path.join(self.configs.saved_data.get("data_dir"), "master-info")),
                "--master_enable_metrics_snapshotter=true",
                "--webserver_port={}".format(self.configs.saved_data.get("master_webserver_port")),
                "--default_memory_limit_to_ram_ratio=0.35",
                "--instance_uuid_override={}".format(self.configs.saved_data.get("master_uuid")),
                "--ysql_pg_conf_csv='shared_preload_libraries=postgres_fdw,postgis-3,postgis_raster-3,postgis_sfcgal-3,postgis_topology-3'"

Tried again CREATE EXTENSION `postgis_topology;` - same error message.

Tried also, several combinations of OS and Yugabyte version with doc present in https://github.com/yugabyte/build-infra/, with lots of messages:

/docker-entrypoint.sh: /root/bin/yb-master: /opt/yb-build/brew/linuxbrew-20181203T161736v9/lib/ld.so: bad ELF interpreter: No such file or directory

In short: is postgis_topology supported by YugabyteDB, or is something I'm doing wrong?

Warning: Please confirm that this issue does not contain any sensitive information

ddorian commented 1 year ago

The problem is:

 ALTER DOMAIN ADD CONSTRAINT not supported yet

Looks like this DDL is not supported yet.

Can you get the full SQL query?

Probably this line: https://github.com/postgis/postgis/blob/9ea7418efd73a964327c73447c6feaf98fc41db6/topology/topology.sql.in#L358