RE: IN List operator , where list of values are over a number of lines
От | White, Ian Keith |
---|---|
Тема | RE: IN List operator , where list of values are over a number of lines |
Дата | |
Msg-id | BLAPR05MB73295CE99A8B90B89883E727E5E7A@BLAPR05MB7329.namprd05.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: IN List operator , where list of values are over a number of lines (Pavel Stehule <pavel.stehule@gmail.com>) |
Список | pgsql-bugs |
Hi
Thank you for your prompt response most apricated.
I agree it is a bizarre behaviour .
Programmatically I wouldn’t rely on that to do concatenation I would expect a specific concatenation operator to required, so it is obvious to all what is going on !
You live and learn
All my colleagues were baffled by this – so I have updated them.
Many Thanks Ian
From: Pavel Stehule <pavel.stehule@gmail.com>
Sent: 01 October 2025 19:16
To: White, Ian Keith <Ian.White@ncratleos.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: IN List operator , where list of values are over a number of lines
Hi st 1. 10. 2025 v 19: 50 odesílatel White, Ian Keith <Ian. White@ ncratleos. com> napsal: Hi We have noticed a quirk in the IN list operator where the list of values are over several lines , but some have missing comma separators. The command
ZjQcmQRYFpfptBannerStart
|
ZjQcmQRYFpfptBannerEnd
Hi
st 1. 10. 2025 v 19:50 odesílatel White, Ian Keith <Ian.White@ncratleos.com> napsal:
Hi
We have noticed a quirk in the IN list operator where the list of values are over several lines , but some have missing comma separators.
The command should fail, however it executes only returning certain values.
Create table, insert vales, show values , select using IN List
First query errors as expected , Second executes with out error! Returning A & F .
Details of server .
Attached is the sql that I ran
Please investigate
Many Thanks Ian White
Member British Computer Society
Oracle & Postgres Database Administrator & Perfomance Expert.
Based London
It is effect of multiline SQL strings
(2025-10-01 20:07:45) postgres=# select 'a' 'hoj';
ERROR: syntax error at or near "'hoj'"
LINE 1: select 'a' 'hoj';
^
but
(2025-10-01 20:08:38) postgres=# select 'a'
postgres-# 'hoj';
┌──────────┐
│ ?column? │
╞══════════╡
│ ahoj │
└──────────┘
(1 row)
Regards
Pavel
Вложения
В списке pgsql-bugs по дате отправления: