Skip to content
Tuesday, August 18, 2026

El Lupanar de Dieguito

Atendido por su dueño.

  • Home
  • Ingresar
  • Registrarse
  • DAF URL Gen
  • DAF ANONYMIZER
  • Acerca de la magia…
  • Mi GitHub
  • Contactame

DELETE con LIMIT en Postgres

Posted on 2019/10/042019/10/07 by Don Diego Puramagia

Sucio y desprolijo:

WITH cte AS (

SELECT my_rowid /* your PK */
FROM batch
WHERE bat_close_time_stamp <= 1507381943.93144 /* your condition */
/* ORDER BY ??? */ /* optional */
LIMIT 500
FOR UPDATE /* SKIP LOCKED */

)
DELETE FROM batch tbl
USING cte
WHERE tbl.my_rowid = cte.my_rowid;

Fuente: stackoverflow.com/questions/52950430/batch-delete-in-postgres-using-a-cursor

Posted in PostgreSQL

Post navigation

Previous: Changing the Auto-Logout Timeout in SSH
Next: Archivos del Garmin

Related Posts

  • Linux
  • PostgreSQL

How To Install PostgreSQL With Docker Quickly

  • Don Diego Puramagia
  • 2020/03/02
  • 0

Many developers still install a database on their computer and work on it. It may be a preferable method, but using Docker takes only seconds […]

  • PostgreSQL

Copiar usaurio de un postgres a otro:

  • Don Diego Puramagia
  • 2020/01/08
  • 0

/usr/pgsql-11/bin/pg_dumpall -p 5432 -U postgres -r | /usr/pgsql-11/bin/psql -p 5433

  • PostgreSQL

PostgreSQL Readonly User

  • Don Diego Puramagia
  • 2019/10/16
  • 0

Rational When you create a user in postgresql, even with only select only permission, your user has a lot more privileges. Solution Connect with root […]

Copyright © 2026 El Lupanar de Dieguito Theme: Terminal News By Adore Themes.