On 13/02/2026 11:00, Dmitry Yemanov wrote:
> 13.02.2026 12:07, 'Mark Rotteveel' via firebird-devel wrote:
>> Any thoughts on this?
>
> Decoding [longish] strings from the delimited list is not a common usage
> pattern, so I think it's OK to optimize the default behaviour for more
> expected cases and require the RETURNING clause otherwise.
It might not be (very) common, but how this function will be used will
likely be on data that might not be clean (otherwise people would
probably have hardcoded things).
> Also, a longer output has also noticeable performance implications, see
> discussion in PR #8878. And returning a blob is gonna be even slower.
In my opinion, robustness (i.e. not resulting in a string truncation
error) in the face of unclean data, or otherwise from a
not-so-trustworthy source is more important as the default than performance.
Things like this are more likely to fail in production situations, as
testing is usually done with less realistic and simpler data, and things
that the programmers or testers actually expect instead of the reality
of dirty or more complex inputs.
If people want optimal performance, then they can explicitly specify the
type using RETURNING.
That said, this something that we could always change based on
user-feedback.
> That said, the output should really be variable-length. It will be fixed
> together with #8878.
Thanks.
A related question, about the separator argument. The documentation says
it can accept a BLOB, as long as it's limited to 32KB. Is that actually
true, or does it accept a VARCHAR, and the blob is automatically
converted before calling UNLIST? Wouldn't that also mean that the actual
upper limit (in characters) depends on the character set?
Mark
--
Mark Rotteveel