Re: Patch: Cover POSITION(bytea,bytea) with tests

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch: Cover POSITION(bytea,bytea) with tests
Date: 2025-03-15 21:52:42
Message-ID: CAHut+Pu__h2xC4zvvWTTi6rBgGtEZ-jeia6HLHy=1XMW2Uixiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

+1 for this.

Some minor comments:

1. I thought the new test cases should be located earlier in the file
where there were already a couple of POSITION tests.
(see "-- E021-11 position expression")

2. Maybe one of your test cases can be identical to the example from
the docs [1].
position('\x5678'::bytea in '\x1234567890'::bytea) → 3

======
[1] https://www.postgresql.org/docs/17/functions-binarystring.html

Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Roberto Mello 2025-03-15 21:55:36 Re: New subscriber - looking for an overview of the code
Previous Message Tom Lane 2025-03-15 21:06:34 Re: Optimization for lower(), upper(), casefold() functions.