Re: FOR UPDATE SKIP LOCKED and get locked row/avoid updating other row(s)

2024-02-13 Thread Wiwwo Staff
On Tue, 13 Feb 2024 at 14:49, David G. Johnston wrote: > On Tuesday, February 13, 2024, Wiwwo Staff wrote: > >> Hi! >> I am implementing a queue using PostgreSQL. >> I am of course using "FOR UPDATE SKIP LOCKED". >> >> Is there any way I can tell PostgreSQL to only "operate" on the locked >> row

Re: FOR UPDATE SKIP LOCKED and get locked row/avoid updating other row(s)

2024-02-13 Thread David G. Johnston
On Tuesday, February 13, 2024, Wiwwo Staff wrote: > Hi! > I am implementing a queue using PostgreSQL. > I am of course using "FOR UPDATE SKIP LOCKED". > > Is there any way I can tell PostgreSQL to only "operate" on the locked > row, and/or a way to reference it? > > Some explanations of what I me

Re: FOR UPDATE SKIP LOCKED and get locked row/avoid updating other row(s)

2024-02-13 Thread Laurenz Albe
On Tue, 2024-02-13 at 11:17 +, Wiwwo Staff wrote: > I am implementing a queue using PostgreSQL. > I am of course using "FOR UPDATE SKIP LOCKED". > > Is there any way I can tell PostgreSQL to only "operate" on the locked row, > and/or a way to reference it? > > Some explanations of what I mea

FOR UPDATE SKIP LOCKED and get locked row/avoid updating other row(s)

2024-02-13 Thread Wiwwo Staff
Hi! I am implementing a queue using PostgreSQL. I am of course using "FOR UPDATE SKIP LOCKED". Is there any way I can tell PostgreSQL to only "operate" on the locked row, and/or a way to reference it? Some explanations of what I mean: - I have a table with N rows - I lock row X with a PG F