Documentation Index
Fetch the complete documentation index at: https://docs.risingwave.com/llms.txt
Use this file to discover all available pages before exploring further.
Syntax
ALTER SUBSCRIPTION subscription_name
alter_option;
alter_option depends on the operation you want to perform on the subscription. For all supported clauses, see the sections below.
Clauses
OWNER TO
ALTER SUBSCRIPTION current_subscription_name
OWNER TO new_user;
| Parameter or clause | Description |
|---|
| OWNER TO | This clause changes the owner of the subscription. |
| new_user | The new owner you want to assign to the subscription. |
-- Change the owner of the subscription named "sub" to user "admin"
ALTER SUBSCRIPTION sub OWNER TO admin;
RENAME TO
ALTER SUBSCRIPTION subscription_name
RENAME TO new_name;
| Parameter or clause | Description |
|---|
| RENAME TO | This clause changes the name of the subscription. |
| new_name | The new name of the subscription. |
-- Rename the subscription named "sub0" to "sub1"
ALTER SUBSCRIPTION sub0 RENAME TO sub1;
SET SCHEMA
ALTER SUBSCRIPTION current_subscription_name
SET SCHEMA schema_name;
| Parameter or clause | Description |
|---|
| SET SCHEMA | This clause moves the subscription to a different schema. |
| schema_name | The name of the schema to which the subscription will be moved. |
-- Move the subscription named "test_subscription" to the schema named "test_schema"
ALTER SUBSCRIPTION test_subscription SET SCHEMA test_schema;
SWAP WITH
ALTER SUBSCRIPTION name
SWAP WITH target_name;
| Parameter | Description |
|---|
| name | The current name of the subscription to swap. |
| target_name | The target name of the subscription you want to swap with. |
-- Swap the names of the user_updates subscription and the admin_updates subscription.
ALTER SUBSCRIPTION user_updates
SWAP WITH admin_updates;