0

I am using postgreSQL with pgAdmin 4 and I have created a database function named "fn_test1()". I want to delete this function and before delete this function, I want to create a backup function named "fn_test1_bk()" . Can anyone help me to do this?

  • 3
    It is really a shame that people spend all that time writing documentation that no one bothers to read. [Alter Function](https://www.postgresql.org/docs/current/sql-alterfunction.html). `ALTER FUNCTION name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] RENAME TO new_name`. There is even an example at bottom of page. Kills two birds with one stone. – Adrian Klaver Aug 31 '22 at 23:43

1 Answers1

1

If you really want to use PgAdmin for this, you can browse to your function, right click, properties, change the name and save.

enter image description here

enter image description here

JGH
  • 15,928
  • 4
  • 31
  • 48