public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Rumpi Gravenstein <[email protected]>
To: David G. Johnston <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: PostgreSQL <[email protected]>
Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
Date: Wed, 6 Aug 2025 18:15:36 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAEpg1wCuZ5DgA_oj=pY8BUnsRP_7Lk24xXwjzp-Atw1-Uir-AA@mail.gmail.com>
References: <CAEpg1wBxp=25isxj6yt2cf97KtvbwxvJfrJ9qYF8UQxGSBJ93Q@mail.gmail.com>
	<[email protected]>
	<CAEpg1wCDL+iYbG7ByjHcgfvJy7m3m-rDp-xKiYovvxeKTbG7iQ@mail.gmail.com>
	<[email protected]>
	<CAEpg1wALRocK=uDSNyJqdc=vhNGjYFmT3H_TNzihSOMS88WHfg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAEpg1wBUcKjbM+vqP=JLHQUCOW9ct=aVRo1gBEtAZ5SuMY6cYQ@mail.gmail.com>
	<CAKFQuwZJJQz=Ap_S7taL1iJwS6tT0AvrVGThpxWMgQk9ZLSy2w@mail.gmail.com>
	<CAEpg1wA=sJ4Cvs3hUN9rfYBwTC74uFWYUzQGfcfZC4u-K1AH7w@mail.gmail.com>
	<CAKFQuwbU+xEmPdPvnvknz==yX5xLG5DuAxJASnPEcb73+WMATg@mail.gmail.com>
	<CAEpg1wCuZ5DgA_oj=pY8BUnsRP_7Lk24xXwjzp-Atw1-Uir-AA@mail.gmail.com>

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 
> <[email protected] <mailto:[email protected]>> wrote:
> 
>     On Wednesday, August 6, 2025, Rumpi Gravenstein <[email protected]
>     <mailto:[email protected]>> 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
[email protected]






view thread (7+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: PostgreSQL Bug with simple function unexpectedly treating varchar parameter as an array
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox