From: | Bindra Bambharoliya <bindra(dot)bambharoliya(at)gmail(dot)com> |
---|---|
To: | "Wetmore, Matthew (CTR)" <Matthew(dot)Wetmore(at)express-scripts(dot)com> |
Cc: | intmail01 <intmail01(at)gmail(dot)com>, pgsql-sql(at)lists(dot)postgresql(dot)org |
Subject: | Re: How to use one function which can be accessed for all schemas |
Date: | 2024-01-09 18:09:09 |
Message-ID: | CAPLVUMCNCZFf9r52MpmoAtyCcLbtZN7+q-ndKA_pSfqp3ifnBw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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), <
Matthew(dot)Wetmore(at)express-scripts(dot)com> 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 <intmail01(at)gmail(dot)com>
> *Sent:* Tuesday, January 9, 2024 12:15 AM
> *To:* pgsql-sql(at)lists(dot)postgresql(dot)org
> *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
>
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2024-01-09 18:38:31 | Re: How to use one function which can be accessed for all schemas |
Previous Message | Wetmore, Matthew (CTR) | 2024-01-09 16:39:58 | How to use one function which can be accessed for all schemas |