Skip to content
Wednesday, July 8, 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

Como ver el estado del servidor postgressql sin ser superuser

  • Don Diego Puramagia
  • 2016/11/06
  • 0

CREATE FUNCTION get_sa() RETURNS SETOF pg_stat_activity AS $$ SELECT * FROM pg_catalog.pg_stat_activity; $$ LANGUAGE sql VOLATILE SECURITY DEFINER; CREATE VIEW pg_stat_activity_allusers AS SELECT * FROM […]

  • PostgreSQL

Postgres Datazo II

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

Ayer Leo necesitaba corregir un sp de XXXX en Produccion. Me pidio por mantis corregirlo una vez, lo ejecutó y tuvo otro error. Me pidio […]

  • Bronca Diaria
  • Informatica
  • PostgreSQL

pgAdmin 4 v1.1, pros y contras.

  • Don Diego Puramagia
  • 2016/12/12
  • 2

El pgAdmin III, tiene sucesor, un completamente nuevo pgAdmin 4 que por desgracia esta muuuuuuuuy verde. Lo pueden encontrar en su sitio: pgadmin.org Pros: Soporta […]

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