Re: Loss of some parts of the function definition
От | Pavel Stehule |
---|---|
Тема | Re: Loss of some parts of the function definition |
Дата | |
Msg-id | CAFj8pRA9XrWhdbzO1v7TuXNgTH=Oh=OZvpfQUNegE1D26sG2sQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Loss of some parts of the function definition (Sergey Grinko <sergey.grinko@gmail.com>) |
Список | pgsql-hackers |
Hi
2015-04-30 13:44 GMT+02:00 Sergey Grinko <sergey.grinko@gmail.com>:
Hi,Dear developers, I have a request to you.Now create a script in the application of its function parameters and return values can be declared using %TYPE.However, when you save the script is stored inside the server only what is considered his body. Thus, we obtain:1) loss of the custom formatting.2) loss of communication parameters and return types with these types of fields to create the function.3) multidimensional arrays are transformed into one-dimensional: [][] -> []4) loss of data accuracy: numeric(n,m) -> numericPlease - how to save and restore the entire text of the definition to CREATE END; unchanged.
I am afraid, it is not possible
Postgres doesn't distinguish between multidimensional and one dimensional arrays - multidimensional is just syntax suger, same is function arguments - Postgres doesn't store precision for parameters. type%TYPE is translated to target type outside plpgsql function. These informations are not saved, so you cannot to take it from PostgreSQL
Regards
Pavel Stehule
--Yours faithfully, Sergey Grinko
Email: sergey.grinko@gmail.com
В списке pgsql-hackers по дате отправления: