tembo-io / pg_vectorize

The simplest way to build AI workloads on Postgres
https://tembo.io/pg_vectorize/
730 stars 33 forks source link

drop table event triggers for vectorize.jobs #148

Open ChuckHend opened 2 weeks ago

ChuckHend commented 2 weeks ago

if a table is dropped that is part of vectorize.jobs, then the vectorize.job should also be deleted.

an event trigger can solve this. some scratch code as example of the idea

CREATE OR REPLACE FUNCTION after_drop_trigger()
RETURNS event_trigger AS $$
BEGIN
    DELETE FROM vectorize.job WHERE table_name = TG_TABLE_NAME;
END;
$$ LANGUAGE plpgsql;
CREATE EVENT TRIGGER trg_after_drop
ON sql_drop
WHEN TAG IN ('DROP TABLE')
EXECUTE FUNCTION after_drop_trigger();
algora-pbc[bot] commented 1 week ago

💎 $200 bounty • Tembo

Steps to solve:

  1. Start working: Comment /attempt #148 with your implementation plan
  2. Submit work: Create a pull request including /claim #148 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to tembo-io/pg_vectorize!

Add a bounty • Share on socials

Attempt Started (GMT+0) Solution
🟢 @varshith257 Oct 17, 2024, 12:22:28 PM #164
🟢 @akhilender-bongirwar #178
varshith257 commented 1 week ago

/attempt #148

Algora profile Completed bounties Tech Active attempts Options
@varshith257 16 bounties from 8 projects
Go, Rust,
Scala & more
﹟145
Cancel attempt
varshith257 commented 1 week ago

@ChuckHend Can I get this issue assigned?

algora-pbc[bot] commented 1 week ago

💡 @varshith257 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] commented 1 day ago

💡 @akhilender-bongirwar submitted a pull request that claims the bounty. You can visit your bounty board to reward.