Re: Creating Functions in Separate Schema - Mailing list pgsql-general

From Richard Huxton
Subject Re: Creating Functions in Separate Schema
Date
Msg-id 412EE964.1050808@archonet.com
Whole thread Raw
In response to Creating Functions in Separate Schema  ("Mark Dexter" <MDEXTER@dexterchaney.com>)
List pgsql-general
Mark Dexter wrote:
> Our application currently runs in Microsoft SQL Server and we are
> porting it over to Postgres.  When we write enbedded SQL queries for SQL
> Server, we need to reference user-defined functions with the prefix
> "dbo." (e.g., "dbo.Function_Name()").  In experimenting with Postgres,
> it appears that we can create a schema called "dbo" and then reference
> functions with the same syntax (e.g., "dbo.Function_Name()").
>
> We're trying to understand whether there will be any disadvantages to
> doing this.  Are there any possible issues or problems with this
> approach?  Any help will be greatly appreciated.  Thanks.

Only that you'll need to be careful if you have two functions with the
same name in different schemas. If you have dbo.fn() and public.fn() and
call fn() then which you get will depend on your search_path.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: postgresql, odbc and escape characters?
Next
From: Kristian Rink
Date:
Subject: Re: postgresql, odbc and escape characters?