DROP SERVER command to remove a foreign server. The user who executes the command must be the owner of the foreign server.
drop_server ::= DROP SERVER [ IF EXISTS ] server_name [ CASCADE | RESTRICT ]
Drop a foreign server named server_name. If it doesn’t exist in the database, an error will be thrown unless the
IF EXISTS clause is used.
RESTRICT is the default and it will not drop the foreign server if any objects depend on it.
CASCADE will drop the foreign server and any objects that transitively depend on it.
Drop the foreign-data wrapper
my_server, along with any objects that depend on it.
yugabyte=# DROP SERVER my_server CASCADE;