Re: Creating Functions in Separate Schema

From: Richard Huxton <dev(at)archonet(dot)com>
To: Mark Dexter <MDEXTER(at)dexterchaney(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Creating Functions in Separate Schema
Date: 2004-08-27 07:57:24
Message-ID: 412EE964.1050808@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yateen Joshi 2004-08-27 08:02:07 Single Row Table?
Previous Message Peter Eisentraut 2004-08-27 07:44:59 Re: postgresql, odbc and escape characters?