public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bindra Bambharoliya <[email protected]>
To: Wetmore, Matthew (CTR) <[email protected]>
Cc: intmail01 <[email protected]>
Cc: [email protected]
Subject: Re: How to use one function which can be accessed for all schemas
Date: Tue, 9 Jan 2024 23:39:09 +0530
Message-ID: <CAPLVUMCNCZFf9r52MpmoAtyCcLbtZN7+q-ndKA_pSfqp3ifnBw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAKJANSAW+2jQXxiZ8jeShHcsoKT_AhAk7HfQrNY+KgDxEC5Y0Q@mail.gmail.com>
<[email protected]>
Create function in public or catalog schema. This function will be visible
to each schema and user
On Tue, 9 Jan 2024, 22:10 Wetmore, Matthew (CTR), <
[email protected]> wrote:
> 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], [email protected]
Subject: Re: How to use one function which can be accessed for all schemas
In-Reply-To: <CAPLVUMCNCZFf9r52MpmoAtyCcLbtZN7+q-ndKA_pSfqp3ifnBw@mail.gmail.com>
* 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