Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rNE3G-00AF71-Pk for pgsql-sql@arkaria.postgresql.org; Tue, 09 Jan 2024 15:30:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rNE3F-00DluN-Rd for pgsql-sql@arkaria.postgresql.org; Tue, 09 Jan 2024 15:30:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rNE3F-00DluF-J7 for pgsql-sql@lists.postgresql.org; Tue, 09 Jan 2024 15:30:01 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rNE3D-000fYb-99 for pgsql-sql@lists.postgresql.org; Tue, 09 Jan 2024 15:30:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 409FTu7m2184655; Tue, 9 Jan 2024 10:29:56 -0500 From: Tom Lane To: intmail01 cc: pgsql-sql@lists.postgresql.org Subject: Re: How to use one function which can be accessed for all schemas In-reply-to: References: Comments: In-reply-to intmail01 message dated "Tue, 09 Jan 2024 11:15:17 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2184653.1704814196.1@sss.pgh.pa.us> Date: Tue, 09 Jan 2024 10:29:56 -0500 Message-ID: <2184654.1704814196@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk intmail01 writes: > I have several schemas in my database, I want to create just one function > to use with all these schema. > I create the function in a main schema then the trigger call the function > and error occurs : "No function matches the given name and argument types. > You might need to add explicit type casts." You can either explicitly schema-qualify the function call, or make sure that that main schema is always present in your search_path. regards, tom lane