Document behaviour of failed sub queries - Mailing list pgsql-docs

From PG Doc comments form
Subject Document behaviour of failed sub queries
Date
Msg-id 162488853426.694.9342956513555878140@wrigleys.postgresql.org
Whole thread Raw
Responses Re: Document behaviour of failed sub queries  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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

pgsql-docs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: change float4 to floating point about type of autovacuum_vacuum_insert_scale_factor
Next
From: PG Doc comments form
Date:
Subject: SETOF specification and default behavior (CREATE FUNCTION)