From: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
---|---|
To: | Igor Neyman <ineyman(at)perceptron(dot)com> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Daniel Verite <daniel(at)manitou-mail(dot)org>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: clone_schema function |
Date: | 2015-09-15 13:44:30 |
Message-ID: | CANu8FiyTLoRd-TUCNazXvygBYBYMgtvrEvC6_rvC0oyknCBvsw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
That is correct. But table old will NOT be converted to new because
only the schema name is converted. And table "old" WILL exist because it
will also be copied.
I have tested and it works properly.
Please do not provide hypothetical examples. Give me an actual working
example that causes the problem.
On Tue, Sep 15, 2015 at 9:39 AM, Igor Neyman <ineyman(at)perceptron(dot)com> wrote:
> I still do not see any problem. The whole purpose of the function is to
> copy ALL sequences , tables and functions to "new" schema, so new.old WILL
> exist.
>
>
> I don't see how you can possibly write a function that references a schema
> that does not yet exist!
>
> Again, please provide a _working_ example of what you think the problem is.
>
>
>
> Melvin,
>
>
>
> This statement:
>
>
>
> SELECT old.field FROM old.old;
>
>
>
> selects column “field” from table “old” which is in schema “old”.
>
>
>
> Your script converts it into:
>
>
>
> SELECT new.field FROM new.old
>
>
>
> which will try to select column “field” from table “new” in schema “new”.
>
> The obvious problem is that there is no table “new” in schema “new”, the
> table will still be called “old”.
>
>
>
> Jim’s example is very similar to what I provided a few days ago.
>
>
>
> Regards,
>
> Igor Neyman
>
>
>
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
From | Date | Subject | |
---|---|---|---|
Next Message | Igor Neyman | 2015-09-15 13:55:58 | Re: clone_schema function |
Previous Message | Igor Neyman | 2015-09-15 13:39:12 | Re: clone_schema function |