On Thu, Jul 30, 2020 at 5:04 PM Bhupendra Babu <bbabu12@gmail.com> wrote:
I created a generic function (DATEFIFF) login to postgres database using psql. ANd I wanted to use across the entire instance , from all other databases.
postgres=> CREATE FUNCTION DateDiff (units VARCHAR(30), start_t TIMESTAMP, end_t TIMESTAMP)
How can I use this function across my entire postgresql instance from any databases ?
So far as a SQL user is concerned Individual databases are isolated from each other. If you want to use the custom function in a database you need to issue the "CREATE FUNCTION" command in that database.