Skip to content

Comments

Add CREATE/DROP SUBSCRIPTION command reference documentation#952

Open
Copilot wants to merge 2 commits intomainfrom
copilot/add-create-subscription-docs-one-more-time
Open

Add CREATE/DROP SUBSCRIPTION command reference documentation#952
Copilot wants to merge 2 commits intomainfrom
copilot/add-create-subscription-docs-one-more-time

Conversation

Copy link
Contributor

Copilot AI commented Feb 9, 2026

Description

Users cannot discover CREATE/DROP SUBSCRIPTION syntax. Missing command reference pages in SQL documentation.

Added:

  • sql/commands/sql-create-subscription.mdx - Syntax, parameters (retention required), examples for table/MV subscriptions
  • sql/commands/sql-drop-subscription.mdx - Syntax with schema support, notes on cursor cleanup

Updated:

  • docs.json - Navigation entries for both commands (alphabetical placement)
  • serve/subscription.mdx - Cross-links to all three command references
  • sql/commands/sql-alter-subscription.mdx - Related topics section
  • sql/commands/sql-show-subscriptions.mdx - CREATE SUBSCRIPTION reference

Example:

-- Create subscription with 1-day retention
CREATE SUBSCRIPTION sub_users FROM users WITH (retention = '1D');

-- Declare cursor and fetch
DECLARE cur SUBSCRIPTION CURSOR FOR sub_users FULL;
FETCH NEXT FROM cur;

Related code PR

N/A - Documentation only

Related doc issue

https://github.com/risingwavelabs/risingwave-docs/issues/[issue-number]

Checklist

  • I have run the documentation build locally to verify the updates are applied correctly.
  • For new pages, I have updated mint.json to include the page in the table of contents.
  • All links and references have been checked and are not broken.
Original prompt

This section details on the original issue you should resolve

<issue_title>Add basic CREATE SUBSCRIPTION command syntax and example to subscription docs</issue_title>
<issue_description>## Context
Slack thread: https://slack.com/archives/C0ABHAHC9A9/p1770666798967039

The thread reports that the basic “create subscription” command is missing from documentation. Multiple related docs issues were created during the discussion.

Problem

Users cannot find the fundamental CREATE SUBSCRIPTION syntax and a minimal example, so the basic operation is unclear or undiscoverable.

Suggested Fix

  • Add canonical CREATE SUBSCRIPTION syntax and a minimal end-to-end example.
  • Explain required fields and the most common options.
  • In serve/subscription.mdx, add a prominent “Create subscription” section near the top and cross-link from related SQL command pages.
  • Ensure navigation and search keywords include “CREATE SUBSCRIPTION” and “subscription”.
Existing Documentation
Codebase References

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: kwannoel <47273164+kwannoel@users.noreply.github.com>
Copilot AI changed the title [WIP] Add basic CREATE SUBSCRIPTION command syntax and example to documentation Add CREATE/DROP SUBSCRIPTION command reference documentation Feb 9, 2026
Copilot AI requested a review from kwannoel February 9, 2026 21:48
@kwannoel kwannoel requested a review from Copilot February 9, 2026 21:57
@kwannoel kwannoel marked this pull request as ready for review February 9, 2026 21:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing SQL command reference pages for managing subscriptions so users can discover CREATE/DROP SUBSCRIPTION syntax and related usage from the SQL docs and the subscription guide.

Changes:

  • Added new command reference pages for CREATE SUBSCRIPTION and DROP SUBSCRIPTION.
  • Added navigation entries in docs.json and cross-links from subscription-related pages.
  • Expanded “Related topics” sections to connect the subscription command docs together.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sql/commands/sql-create-subscription.mdx New reference page documenting CREATE SUBSCRIPTION syntax, parameters, and examples.
sql/commands/sql-drop-subscription.mdx New reference page documenting DROP SUBSCRIPTION syntax, parameters, notes, and examples.
docs.json Adds both new pages to the SQL commands navigation.
serve/subscription.mdx Adds direct links to the CREATE/DROP/ALTER subscription command reference pages.
sql/commands/sql-alter-subscription.mdx Adds “Related topics” cards linking to CREATE/DROP and the subscription guide.
sql/commands/sql-show-subscriptions.mdx Adds a “CREATE SUBSCRIPTION” related-topic card for better discoverability.

Comment on lines 690 to 695
"sql/commands/sql-create-sink-into",
"sql/commands/sql-create-sink",
"sql/commands/sql-create-source",
"sql/commands/sql-create-subscription",
"sql/commands/sql-create-table",
"sql/commands/sql-create-user",
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description/checklist mentions updating mint.json for new pages, but this repository doesn’t appear to have a mint.json and this PR doesn’t change it. Please either update the correct TOC/navigation file(s) or adjust the PR description/checklist to match what was actually updated (likely docs.json).

Copilot uses AI. Check for mistakes.
Comment on lines 706 to 713
"sql/commands/sql-drop-schema",
"sql/commands/sql-drop-secret",
"sql/commands/sql-drop-sink",
"sql/commands/sql-drop-source",
"sql/commands/sql-drop-subscription",
"sql/commands/sql-drop-table",
"sql/commands/sql-drop-user",
"sql/commands/sql-drop-view",
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New command pages are added to docs.json, but sql/commands/overview.mdx currently has cards for ALTER/SHOW subscription commands and still lacks entries for CREATE/DROP SUBSCRIPTION. Consider adding cards there too to keep the SQL commands overview complete and improve discoverability.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add basic CREATE SUBSCRIPTION command syntax and example to subscription docs

2 participants