BUG #16834: where-in: if the nested query fails, the parent query returns all the records

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #16834: where-in: if the nested query fails, the parent query returns all the records
Дата
Msg-id 16834-f05c5c8510bf31a9@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #16834: where-in: if the nested query fails, the parent query returns all the records  (Pantelis Theodosiou <ypercube@gmail.com>)
Re: BUG #16834: where-in: if the nested query fails, the parent query returns all the records  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      16834
Logged by:          Flavio Ricci
Email address:      flavio.ricci82@gmail.com
PostgreSQL version: 11.9
Operating system:   x86_64-pc-linux-gnu
Description:

Hi,

I have found out that in  a where-in query if the nested query fails, the
parent query returns all the records if the where condition field matches
with the selected field in the inner query.
Example:
SELECT *
FROM  table_a 
WHERE field_only_in_parent_table IN (
   SELECT field_only_in_parent_table 
   FROM table_b 
   WHERE name = 'John Doe')

If you run only the nested query it fails because the field does not exist
for table_b
If you run all the query, it returns all the records of table_a

Regards,

Flavio


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Andrey Borodin
Дата:
Сообщение: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
Следующее
От: Jurko Gospodnetić
Дата:
Сообщение: Re: BUG #16825: When building on Windows, cl /? retrun 'x64' not AMD64 and the build does not create x64 environment