Re: Stored function | Grayed out option when I try modify the return type

From: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Stored function | Grayed out option when I try modify the return type
Date: 2018-07-12 10:15:29
Message-ID: 2349260e-16f5-98f6-0a24-5395d6410511@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am 12.07.2018 um 11:28 schrieb Abelardo León González:
> Sorry for top-posting here. :S I won't do it anymore.
>
> The idea is to modify the original function in order to meet the requirements.

yeah, i understand.

> It's not to create two functions, it's to modify the original one.
> Internally, pgAdmin should invoke to the "alter function" command so that this modification doesn't create another function.

it's not a limitation of PGAdmin.

> If I have created funcA with return type smallint but I would like to modify to integer, pgAdmin shouldn't create another one but let us directly modify the original funcA's return type.

You can pull out the whole function definition, for instance within psql
with \ef <function_name>, safe this into a file, drop the function, edit
the file and create the new function.
Seems a bit of strange, but that's the usual way.
>
> Sorry for my English (I am non English native).

the same for me ;-)

Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2018-07-12 12:19:27 Re: ODBC - Getting CONN ERROR: errmsg='The buffer was too small for the InfoValue'
Previous Message Abelardo León González 2018-07-12 09:28:37 RE: Stored function | Grayed out option when I try modify the return type