Re: clone_schema function
От | David G. Johnston |
---|---|
Тема | Re: clone_schema function |
Дата | |
Msg-id | CAKFQuwaec+2vTt5YxOAirOZaMq4XMKBUpAC07Ws36xh=Dn2ofA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: clone_schema function (Melvin Davidson <melvin6925@gmail.com>) |
Ответы |
Re: clone_schema function
|
Список | pgsql-general |
I will ignore all further comments.schema, and function that fails for reasonable , practical designUnless you care to take the time to provide a fullIgor,Naming a table the same as a schema is a very silly idea.
I understand your point, however, I have spent over a week making a function
that previously did very little do a lot.On Tue, Sep 15, 2015 at 9:55 AM, Igor Neyman <ineyman@perceptron.com> wrote:
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.
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 “old” in schema “new”.
Again:
SELECT new.field
means select column “field” from table “new”, which does not exists.
Not sure, what other example you need.
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.
В списке pgsql-general по дате отправления: