Skip to content
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

Sql Server - add support for NOT FOR REPLICATION clause option #1524

Open
slauson opened this issue Oct 4, 2021 · 2 comments
Open

Sql Server - add support for NOT FOR REPLICATION clause option #1524

slauson opened this issue Oct 4, 2021 · 2 comments
Labels
feature:syntax feature A new feature (we all like those) propose-close

Comments

@slauson
Copy link

slauson commented Oct 4, 2021

Is your feature request related to a problem? Please describe.
There is currently no way to add the NOT FOR REPLICATION clause option. For creating new tables with the option I'm currently using the AsCustom column type option for it, but it requires including the column type, identity property, and not for replication clause as the custom type.

Describe the solution you'd like
Add a Sql Server extension to allow adding the NOT FOR REPLICATION clause.

Additional context
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql?view=sql-server-ver15

Is this a feature you'd like to submit a PR for?
Possibly.

@jzabroski
Copy link
Collaborator

jzabroski commented Oct 5, 2021

I wonder if we should abstract it into a general Publication syntax root. My sense is that since this hasn't really been requested before, most people leave it to (SQL Server or Postgres) DBAs to set up replication and thus likely don't manage it from C#. Postgres also doesn't allow you to micro-manage replication the way SQL Server does. A table is either in a publication or it's not.

I would therefore lean towards just using ISupportAdditionalFeatures to add metadata into the column expression.

@jzabroski jzabroski added feature A new feature (we all like those) feature:syntax labels May 3, 2022
@jzabroski
Copy link
Collaborator

Postgres 15 has support for specific column publication but it is controlled at the publication level, not the column level. Indicates that different systems have different complexity for this feature.

https://www.postgresql.fastware.com/blog/column-lists-in-logical-replication-publications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:syntax feature A new feature (we all like those) propose-close
Projects
None yet
Development

No branches or pull requests

3 participants