Re: clone_schema function

Поиск
Список
Период
Сортировка
От Igor Neyman
Тема Re: clone_schema function
Дата
Msg-id A76B25F2823E954C9E45E32FA49D70ECCD516009@mail.corp.perceptron.com
обсуждение исходный текст
Ответ на Re: clone_schema function  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general

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

 

В списке pgsql-general по дате отправления:

Предыдущее
От: Biswadeep Banerjee
Дата:
Сообщение: Re: [BUGS] BUG #13619: regression functions return Null
Следующее
От: Igor Neyman
Дата:
Сообщение: Re: clone_schema function