Skip to content

Postgresql ALTER TABLE operation: REPLICA IDENTITY #1844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MohamedAbdeen21
Copy link
Contributor

Add support for the psql-specific ALTER TABLE operation REPLICA IDENTITY

Docs: https://www.postgresql.org/docs/current/sql-altertable.html

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

Thanks @MohamedAbdeen21! left a couple minor comments, the changes look good to me overall

@@ -208,6 +229,12 @@ pub enum AlterTableOperation {
old_partitions: Vec<Expr>,
new_partitions: Vec<Expr>,
},
/// REPLICA IDENTITY { DEFAULT | USING INDEX index_name | FULL | NOTHING }
///
/// Note: this is a PostgreSQL-specific operation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a link to the docs ideally so folks can easily find where the syntax comes from?

@@ -39,6 +39,27 @@ use crate::ast::{
use crate::keywords::Keyword;
use crate::tokenizer::Token;

#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
Copy link
Contributor

Choose a reason for hiding this comment

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

It could be helpful here to add a description comment for the enum with a link to the docs

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.

2 participants