Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
Дата
Msg-id 5f2ce075-25f2-460e-8efc-0eec89afffca@aklaver.com
обсуждение исходный текст
Ответ на Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array  (Rumpi Gravenstein <rgravens@gmail.com>)
Список pgsql-general
On 8/6/25 14:39, Rumpi Gravenstein wrote:
> That having a table and function with similar names causes this problem 
> is a bug.

Actually it is that a type and function have the same name. The 
connection is the table as that where the type gets it's name. Further 
complicated by you doing _type_name which turns the type into an array 
type.

Now that you know, as the old joke goes:

Doctor: What is the problem?
Patient: It hurts when I do this.
Doctor: Then don't do that.

:)

> 
> Going forward I'll be sure to avoid the problem.
> 
> On Wed, Aug 6, 2025 at 5:35 PM David G. Johnston 
> <david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>> wrote:
> 
>     On Wednesday, August 6, 2025, Rumpi Gravenstein <rgravens@gmail.com
>     <mailto:rgravens@gmail.com>> wrote:
> 
>         Here's a reproducible test case that causes the problem in
>         different schemas.  The issue appears to be related to creating
>         a table and a function that has the same name as the table with
>         a prepended underscore.
> 
> 
>     Don’t do that.  Naming a function (action) and table (noun) the same
>     seems unwise anyway, underscores or no.
> 
>     David J.
> 
> 
> 
> -- 
> Rumpi Gravenstein


-- 
Adrian Klaver
adrian.klaver@aklaver.com



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