Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx <mailto:david.g.johnston@xxxxxxxxx>> wrote:

    On Wednesday, August 6, 2025, Rumpi Gravenstein <rgravens@xxxxxxxxx
    <mailto:rgravens@xxxxxxxxx>> 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@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux