Re: Cross-schema view issue/question

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: Bosco Rama <postgres(at)boscorama(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cross-schema view issue/question
Date: 2011-04-23 12:48:06
Message-ID: 4db2ca8b.830a440a.1890.02ca@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Apr 14, 2011 at 07:33:17PM -0700, Bosco Rama wrote:
> 1) a function that removes/creates the views, etc in the 'xyz' schema
> that gets called as part of the replacement process for schema 'abc'
>
> 2) replacing the views, etc. with functions that return tables or
> the results of dynamic queries.
>
> 3) have the user create the views, etc. as 'temp' items in their
> session each time. Though this may still conflict with the
> replacement since there will still be a tight coupling between
> the temp objects and the 'abc' schema and the replacement occurs
> regardless of the current state of user connections.

#2 will screw up query planning substantially; I'd steer clear of it. The
other two options are essentially deciding whether you or your user will
recreate the xyz objects each time you replace abc. That's kinda a religious
issue, and depends on things like how stable your user expects the objects in
xyz to be.

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marinos Yannikos 2011-04-23 14:00:44 Need to replace SAN, best method with least downtime? (8.4.4)
Previous Message Jorge Arévalo 2011-04-23 11:36:20 Re: Should I free this memory?