Re: BUG #17869: Inconsistency between PL/pgSQL Function Parameter Handling and SQL Query Results

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #17869: Inconsistency between PL/pgSQL Function Parameter Handling and SQL Query Results
Дата
Msg-id CAKFQuwZODJBFsmwABafXWhd6xCAKF8q_1EOE2xPZnPCDRcLYJw@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #17869: Inconsistency between PL/pgSQL Function Parameter Handling and SQL Query Results  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17869: Inconsistency between PL/pgSQL Function Parameter Handling and SQL Query Results
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17869: Inconsistency between PL/pgSQL Function Parameter Handling and SQL Query Results