Skip to content
Tuesday, July 28, 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

  • PostgreSQL

CAMBIAR ENCODING DE UTF-8 A LATIN1 EN POSTGRESQL

  • Don Diego Puramagia
  • 2016/09/08
  • 0

El cambio es muy simple, primero ingresamos al terminal toot linux y ejecutamos su – postgres Ya estamos como usuario postgres Entramos al Postgresql ejecutando […]

  • PostgreSQL

entity-attribute-value design in PostgreSQL – don’t do it! – CYBERTEC

  • Don Diego Puramagia
  • 2021/11/27
  • 0

Customers have often asked me what I think of “Entity-attribute-value” (EAV) design. So I thought it would be a good idea to lay down my […]

  • PostgreSQL

Datazo

  • Don Diego Puramagia
  • 2016/10/10
  • 0

Recién tuve que hacer un insert masivo de registros borrados por error (desde Chaco) sobre una tabla de Prevencion PROD que tiene TRIGGGERS. Tomé los […]

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