Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
postgres - Move record from one table to another(same schema) after 24 hours of insertion

I have a table X and another table Y with same schema. When a record is inserted in X, after 24 hours, it should be moved to Y automatically. How can I achieve this in postgres?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Postgres does not have such automation, you have to use external tools. Eg, make a cronjob to run the script which will do that, smth like: pslq -d dbname -c "begin; with d as (delete from x where ts < now() - '1 day'::interval returning *) insert into yselect * from d;; end;"

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!