pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: lucvanlind.en@gmail.com
Subject: BUG #18239: select position ('' in 'A') returns 1
Date: Sun, 10 Dec 2023 10:22:35 +0000
Message-ID: <18239-50b7f8e43ec7be76@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18239
Logged by:          Luc Van Linden
Email address:      lucvanlind.en@gmail.com
PostgreSQL version: 15.3
Operating system:   windows 10 64 bit
Description:        

We simplified the bug, or maybe undocumented behavior to its simplest
testcase.

select position ('' in 'A') returns 1

Thus, case a field has an empty string while, checking positions in another
string, it seems to always fit the position 1.

Not sure if this is intended or not, at least we experience this as a bug.



view thread (3+ messages)  latest in thread

Message-ID: <18239-50b7f8e43ec7be76@postgresql.org>
Permalink:  ../18239-50b7f8e43ec7be76@postgresql.org/
Also on:    postgresql.org/message-id/18239-50b7f8e43ec7be76@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, lucvanlind.en@gmail.com
  Subject: Re: BUG #18239: select position ('' in 'A') returns 1
  In-Reply-To: <18239-50b7f8e43ec7be76@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox