Re: CREATE SYNONYM ... - Mailing list pgsql-patches

From Jonah H. Harris
Subject Re: CREATE SYNONYM ...
Date
Msg-id 36e682920603071712s350bf822geebe116716149732@mail.gmail.com
Whole thread Raw
In response to Re: CREATE SYNONYM ...  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: CREATE SYNONYM ...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On 3/7/06, Alvaro Herrera <alvherre@commandprompt.com> wrote:
Well, if you don't want to have a monstrous search path with 130+
schemas, then you'll have a monstrous amount of synonyms.  Given that
schemas are a way to separate the object namespace, it seems more
sensible to me to propagate the user of reasonable search paths than the
use of hundreds (thousands?) of synonyms.

Like I said, sometimes the user doesn't have a choice.   Sure, it's easy to tell someone that has a 300-line PHP application to fix their code, but I've worked with people who have hundreds of thousands of lines of code and they don't just say, "gee, let's just search-and-replace everything!"; that's a testing nightmare.

Also, there's *usually* not thousands of synonyms, usually tens or hundreds.  Again, they are mainly used to easily reference objects which exist in other schemas or where there are duplicate object names across schemas.


--
Jonah H. Harris, Database Internals Architect
EnterpriseDB Corporation
732.331.1324

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: CREATE SYNONYM ...
Next
From: Tom Lane
Date:
Subject: Re: variance aggregates per SQL:2003