Patch: Cover POSITION(bytea,bytea) with tests
Hi,
This function is currently not covered by any tests. The proposed
patch fixes this.
--
Best regards,
Aleksander Alekseev
Attachments:
v1-0001-Cover-POSITION-bytea-bytea-with-tests.patchapplication/octet-stream; name=v1-0001-Cover-POSITION-bytea-bytea-with-tests.patchDownload+28-1
On 27.02.2025 17:40, Aleksander Alekseev wrote:
Hi,
This function is currently not covered by any tests. The proposed
patch fixes this.--
Best regards,
Aleksander Alekseev
Hi,
+1. The 'POSISTION' tests include 'text', 'bits' types, but not 'bytea'.
--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.
+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]https://www.postgresql.org/docs/17/functions-binarystring.html.
position('\x5678'::bytea in '\x1234567890'::bytea) → 3
======
[1]: https://www.postgresql.org/docs/17/functions-binarystring.html
Kind Regards,
Peter Smith.
Fujitsu Australia
Hi Peter,
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
Thanks.
Here is the corrected patch.
--
Best regards,
Aleksander Alekseev
Attachments:
v2-0001-Cover-POSITION-bytea-bytea-with-tests.patchapplication/octet-stream; name=v2-0001-Cover-POSITION-bytea-bytea-with-tests.patchDownload+36-1
The following review has been posted through the commitfest application:
make installcheck-world: tested, passed
Implements feature: tested, passed
Spec compliant: tested, passed
Documentation: tested, passed
Hi Aleksander,
your patch looks good to me.
Changing status to `Ready for Committer`
Regards,
Rustam Allakov
The new status of this patch is: Ready for Committer