Re: transfering tables into other schema

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: transfering tables into other schema
Date: 2009-02-18 09:44:27
Message-ID: 20090218104427.0061ed3c@dawn.webthatworks.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 17 Feb 2009 22:11:03 -0700
Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:

> This is incorrect. As long as both tables are in your search path
> it will work just fine. But you do have to re-connect to flush
> your cached plans for the functions.

That was the missing part.
It seems the trick is going to be the search path.
I'm not sure this is what I'm looking for or at least I don't feel
that comfort with the scenario.

It looks like I may put myself in a situation where I may get
trapped by insidious bugs related to the order in which the schema
path is read.

I think I prefer to spend some time qualifying the schema in the
functions so if I'm going to run in any bug I'll find it earlier
than later.

Before I try to see what happens to every object, relation, etc...
etc... is there anything else that is going to change
automatically/should be done manually once I move a table in a new
schema?

The manual says:
Associated indexes, constraints, and sequences owned by table
columns are moved as well.
But at my eyes I still can grasp the extent of the change. So I
wouldn't like to be bitten by something I didn't take into account.

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2009-02-18 09:48:40 Re: could not write block
Previous Message Kopljan Michael 2009-02-18 09:39:32 Re: could not write block