6 ms·
Examples?
by jshen 5y ago
Examples?
- ledgerdev 5y agolisten/notify edit: https://github.com/cockroachdb/cockroach/issues/41522 https://github.com/cockroachdb/cockroach/issues/41522
- tyingq 5y agoThere's a list here: https://www.cockroachlabs.com/docs/stable/postgresql-compatibility.html https://www.cockroachlabs.com/docs/stable/postgresql-compati...
- boiler_up800 5y agoThere is some Yugabyte marketing material that lists: - expression based indexes - partial indexes - table functions - stored procedures - multidimensional arrays - triggers - user defined types - temporary tables - row level security - column level privileges - extensions As being areas where cockroach is not pg compatible. That said, besides temporary tables I would consider all of these to be more advanced features.
- dap 5y agoI’m not sure about that list. I’ve used partial indexes and users defined types with CockroachDB
- vvern 5y agoExpression-based indexes were added in the previous release. Partial indexes have been around for two releases. Those two combine pretty well. Temp tables exist and have existed for two years, but the implementation is not very good; they’re essentially regular tables which get cleaned up. UDFs exist in terms of enums but not records. Functions, procedures, and triggers are next up.
- candiddevmike 5y agoTriggers for me, though you could argue those could/should be baked in the queries.
- throwawayboise 5y agoI would argue strongly for that. Triggers should be used rarely. If you need an update to cause some other side effect, make the whole process explicit in a stored procedure. Triggers can cause suprises and affect transactions in ways that are not always obvious.
- candiddevmike 5y agoMaybe I'm a sadist, but I love triggers. I can easily compare old and new values with them and call functions that also can do comparisons and if statements. Can I do all of this in query? Maybe, but it would look very ugly (especially if I forego the functions too). I only have one app interacting with the database, but if I had more the triggers would enforce data consistency too. Triggers are hard to trace, I'll give you that. I try to test them pretty thoroughly via application unit tests though.
- ranguna 5y agoI 100% agree with you in all points. Triggers are incredibly useful and we shouldn't be scared of them, we should be careful though.