Re: How to use one function which can be accessed for all schemas

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: intmail01 <intmail01(at)gmail(dot)com>
Cc: 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 15:29:56
Message-ID: 2184654.1704814196@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

intmail01 <intmail01(at)gmail(dot)com> 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Wetmore, Matthew (CTR) 2024-01-09 16:39:58 How to use one function which can be accessed for all schemas
Previous Message Maximilian Tyrtania 2024-01-09 11:17:06 Re: Problem with refcursor