Re: IN List operator , where list of values are over a number of lines

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: "White, Ian Keith" <Ian(dot)White(at)ncratleos(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: IN List operator , where list of values are over a number of lines
Date: 2025-10-01 18:16:26
Message-ID: CAFj8pRDp4YGbHxFZ-3oue5bFwN425xcwxjSsA74yZYFHdMfUPw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi

st 1. 10. 2025 v 19:50 odesílatel White, Ian Keith <Ian(dot)White(at)ncratleos(dot)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
>
>
>
> [image: ncr corporation]
>
> Oracle & Postgres Database Administrator & Perfomance Expert.
>
> Based London
>
> Ian(dot)White(at)ncratleos(dot)com
>
>
>

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)

https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS

Regards

Pavel

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2025-10-02 00:08:30 Re: BUG #19062: PostgreSQL 12.22 does not compile because of conflicting types for CollationCreate
Previous Message Kevin Oommen Anish 2025-10-01 15:55:53 [Bug] Usage of stale dead_items pointer in parallel vacuum