public inbox for [email protected]
help / color / mirror / Atom feedFrom: Wetmore, Matthew (CTR) <[email protected]>
To: intmail01 <[email protected]>
To: [email protected] <[email protected]>
Subject: How to use one function which can be accessed for all schemas
Date: Tue, 9 Jan 2024 16:39:58 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKJANSAW+2jQXxiZ8jeShHcsoKT_AhAk7HfQrNY+KgDxEC5Y0Q@mail.gmail.com>
References: <CAKJANSAW+2jQXxiZ8jeShHcsoKT_AhAk7HfQrNY+KgDxEC5Y0Q@mail.gmail.com>
Schema qualify your function and trigger names. Schema qualify everything, it’s good practice and doesn’t need to rely on search_path.
This error say exactly that.
CREATE FUNCTION test(…
CREATE FUNCTION myschema.test(
From: intmail01 <[email protected]>
Sent: Tuesday, January 9, 2024 12:15 AM
To: [email protected]
Subject: [EXTERNAL] How to use one function which can be accessed for all schemas
Hi,
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."
How to use just one function which can be work amongst all shemas in the db ?
My objective is to reduce update of functions code just once not for many schemas. I dont want to duplicate my functions for each schema.
Thanks
view thread (5+ messages) latest in thread
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]
Subject: Re: How to use one function which can be accessed for all schemas
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