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: Add support for triggers in CockroachDB #28296

Open
Tracked by #91331
awoods187 opened this issue Aug 6, 2018 · 9 comments
Open
Tracked by #91331

sql: Add support for triggers in CockroachDB #28296

awoods187 opened this issue Aug 6, 2018 · 9 comments
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL C-wishlist A wishlist feature. T-sql-queries SQL Queries Team X-anchored-telemetry The issue number is anchored by telemetry references.
Milestone

Comments

@awoods187
Copy link
Contributor

awoods187 commented Aug 6, 2018

Feature request to add support for triggers in CockroachDB

Epic CRDB-347

Jira issue: CRDB-4914

@awoods187 awoods187 added the C-wishlist A wishlist feature. label Aug 6, 2018
@awoods187 awoods187 added this to the Later milestone Aug 6, 2018
@awoods187 awoods187 changed the title Add support for triggers in CockroachDB SQL: Add support for triggers in CockroachDB Aug 6, 2018
@awoods187 awoods187 added this to Triage in (DEPRECATED) SQL Front-end, Lang & Semantics via automation Aug 7, 2018
@knz knz moved this from Triage to Feature requests / pie-in-the-skie in (DEPRECATED) SQL Front-end, Lang & Semantics Oct 2, 2018
@knz knz added the A-sql-pgcompat Semantic compatibility with PostgreSQL label Oct 2, 2018
@knz knz changed the title SQL: Add support for triggers in CockroachDB sql: Add support for triggers in CockroachDB Nov 12, 2018
@knz knz added the X-anchored-telemetry The issue number is anchored by telemetry references. label Nov 22, 2018
@jordanlewis jordanlewis moved this from Triage to Lower priority backlog in [DEPRECATED] Old SQLExec board. Don't move stuff here Apr 24, 2019
@asubiotto asubiotto moved this from Lower priority backlog to [TENT] SQL Features in [DEPRECATED] Old SQLExec board. Don't move stuff here Apr 2, 2020
@Ranguna
Copy link

Ranguna commented Aug 13, 2021

+1 for this.
Triggers and functions are one of the few things blocking us from migrating aurora to cockroach. Can't wait to see this.

One question, is there any reason this issue is under a project that appears to be "deprecated"?

@ajwerner
Copy link
Contributor

One question, is there any reason this issue is under a project that appears to be "deprecated"?

Only because of internal organizational change since this was filed.

Triggers very much depends on some form of #17511. I think we've increasingly got an idea of what goes in to a basic form of it. That's not a small project by any stretch. After that, integrating triggers into the query planning layer is also not a small project. I do think there's some enthusiasm around doing this but I wouldn't expect it to happen for at least another couple of releases (which would mean at least a year from now). Even that would be pretty ambitious.

@Ranguna
Copy link

Ranguna commented Aug 14, 2021

Thank you for all the information, it's good to know this hasn't been forgotten!

Please take as much time as needed to do this correctly, I'll be patiently waiting.

Keep up the awesome work 👌

@AraHaan
Copy link

AraHaan commented Sep 23, 2022

Any ETA on this? This is preventing me from migrating from sql server stored on my laptop to cockroachDB. Of which I would love to use cockroachDB in the future to try it out with my Discord Bot.

As much as I would love to keep it on my laptop, there is no guarantee (unlike cockroachDB that my laptop won't be infected by a virus that could wipe the db out).

(I care more about triggers than stored procedures atm)

@Ranguna
Copy link

Ranguna commented Sep 23, 2022

I care more about triggers than stored procedures atm

@AraHaan you need part of the work that will be done/is done in stored procedures to unblock work on triggers.

So for now, we'll have to wait on both.

@rytaft rytaft added this to Triage in SQL Queries via automation Dec 5, 2022
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Dec 5, 2022
@rytaft rytaft moved this from Triage to Backlog in SQL Queries Dec 5, 2022
@pillzu
Copy link

pillzu commented Mar 13, 2023

Heyo
Any updates on this? It's been nearly 4-5 years since the issue came into light and I am unable to find anything on trigger support for cdb yet. Would really appreciate any updates on this since I've been using it in my current project and the complexity kinda requires triggers to achieve the intended outcome (I can do it on the server end but I'd rather use triggers if possible for less load on the server machine).

@ajwerner
Copy link
Contributor

We've been hard at work on implementing UDFs, which are a pre-requisite for triggers. In the previous release we previewed support for basic UDFs. We have been continuing down that path. We don't yet support performing writes from UDFs. This issue has not been ignored, but is large.

@pillzu
Copy link

pillzu commented Mar 13, 2023

I see! Thanks a lot @ajwerner! Really appreciate the quick response.
Will be waiting for the release.

Good luck

@ajwerner
Copy link
Contributor

Just to be more concrete, I don't expect triggers to be implemented for at least another year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL C-wishlist A wishlist feature. T-sql-queries SQL Queries Team X-anchored-telemetry The issue number is anchored by telemetry references.
Projects
Status: 24.3 Release
(DEPRECATED) SQL Front-end, Lang & Se...
  
Feature requests / pie-in-the-skie
SQL Queries
Backlog (DO NOT ADD NEW ISSUES)
Development

No branches or pull requests

6 participants