On Sunday, March 26, 2023, PG Bug reporting form <
noreply@postgresql.org> wrote:
The following bug has been logged on the website:
Bug reference: 17869
Logged by: Jiangshan Liu
Email address: jiangshan.liu@tju.edu.cn
PostgreSQL version: 15.2
Operating system: Ubuntu 18.04
Description:
However, when passing fixed-length character types as parameters in PL/pgSQL
functions, the behavior seems to be different. The documentation states that
parenthesized type modifiers are discarded by CREATE FUNCTION, meaning that
CREATE FUNCTION foo (varchar(10)) is the same as CREATE FUNCTION foo
(varchar) [2].
Yet more reason for why one should restrict themself to using the text data type and forget about character as well as the length-specifying variants.
I’m doubting there is a bug here, rather a system limitation with a low motivation to try and overcome.
David J.