On Thu, Feb 16, 2017 at 7:52 AM, pinker wrote:
> Adrian Klaver-4 wrote
> > https://www.postgresql.org/docs/9.6/static/sql-truncate.html
> >
> > https://www.postgresql.org/docs/9.6/static/sql-delete.html
>
> There is nothing about FOR UPDATE clause on those pages...
>
​Both truncate and delete ar
On 02/16/2017 07:42 AM, pinker wrote:
Adrian Klaver-4 wrote
Exactly, they do not have it whereas:
https://www.postgresql.org/docs/9.6/static/sql-select.html#SQL-FOR-UPDATE-SHARE
Still not much. The documentation could be more verbose on this topic. I can
only presume that since there is an ex
Adrian Klaver-4 wrote
> Exactly, they do not have it whereas:
>
> https://www.postgresql.org/docs/9.6/static/sql-select.html#SQL-FOR-UPDATE-SHARE
Still not much. The documentation could be more verbose on this topic. I can
only presume that since there is an example with select:
SELECT * FROM (SE
On 02/16/2017 06:52 AM, pinker wrote:
> Adrian Klaver-4 wrote
>> https://www.postgresql.org/docs/9.6/static/sql-truncate.html
>>
>> https://www.postgresql.org/docs/9.6/static/sql-delete.html
>
> There is nothing about FOR UPDATE clause on those pages...
Exactly, they do not have it whereas:
http
Adrian Klaver-4 wrote
> https://www.postgresql.org/docs/9.6/static/sql-truncate.html
>
> https://www.postgresql.org/docs/9.6/static/sql-delete.html
There is nothing about FOR UPDATE clause on those pages...
--
View this message in context:
http://postgresql.nabble.com/Using-ctid-in-delete-st
On 02/16/2017 02:04 AM, pinker wrote:
Thank you Tom for clarification.
Does it mean that FOR UPDATE clause works with other operations as well?
i.e. TRUNCATE, DELETE?
https://www.postgresql.org/docs/9.6/static/sql-truncate.html
https://www.postgresql.org/docs/9.6/static/sql-delete.html
--
Thank you Tom for clarification.
Does it mean that FOR UPDATE clause works with other operations as well?
i.e. TRUNCATE, DELETE?
--
View this message in context:
http://postgresql.nabble.com/Using-ctid-in-delete-statement-tp5944434p5944658.html
Sent from the PostgreSQL - general mailing list ar
Vick Khera writes:
> On Wed, Feb 15, 2017 at 10:32 AM, pinker wrote:
>> DELETE FROM table_name WHERE ctid = any ( array ( select tn.ctid from
>> table_name tn JOIN items i on tn.itemid=i.itemid WHERE tn.clock < extract (
>> epoch FROM now() - i.history * interval '10 day')::int + 6 limit 100));
>
thank you for the answer
--
View this message in context:
http://postgresql.nabble.com/Using-ctid-in-delete-statement-tp5944434p591.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make ch
On Wed, Feb 15, 2017 at 10:32 AM, pinker wrote:
> DELETE FROM table_name WHERE ctid = any ( array ( select tn.ctid from
> table_name tn JOIN items i on tn.itemid=i.itemid WHERE tn.clock < extract (
> epoch FROM now() - i.history * interval '10 day')::int + 6 limit 100));
>
> Could I be sure that
Hi,
is it safe to use ctid in following query? :
DELETE FROM table_name WHERE ctid = any ( array ( select tn.ctid from
table_name tn JOIN items i on tn.itemid=i.itemid WHERE tn.clock < extract (
epoch FROM now() - i.history * interval '10 day')::int + 6 limit 100));
Could I be sure that ctid will
11 matches
Mail list logo