From: | PG Doc comments form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Cc: | jackbicknell(at)gmail(dot)com |
Subject: | Document behaviour of failed sub queries |
Date: | 2021-06-28 13:55:34 |
Message-ID: | 162488853426.694.9342956513555878140@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/13/functions-subquery.html
Description:
I have found that when a sub query fails, the preceeding IN will ignore the
failure and execute as if the subquery did not exist.
I think this should either be stated explicitly in the documentation or it
should fail the main the query.
For example:
UPDATE table1 SET status='expired' WHERE id in (SELECT wrong_id IN table2)
This will update every row in table1if wrong_id doesn't exist, ignoring the
ERROR: column "wrong_id" does not exist from the subquery.
If you feel like the documentation explains this thoroughly enough already
then please point me in the direction. At the moment it makes refernece to
queries not completing but it doesn't mention failures.
Thanks
Jack
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2021-06-28 15:37:15 | SETOF specification and default behavior (CREATE FUNCTION) |
Previous Message | Peter Eisentraut | 2021-06-25 06:17:10 | Re: change float4 to floating point about type of autovacuum_vacuum_insert_scale_factor |