Roman Neuhauser wrote:
What would your hassle-free CREATE OR REPLACE do in this situation? What should the fiew look like after you replace foo() with foo(int4)? CREATE TYPE t1 AS ( a INTEGER, b INTEGER, c INTEGER ); CREATE TYPE t1 AS ( a TEXT, c TEXT ); CREATE FUNCTION foo() RETURNS SETOF t1 ... CREATE VIEW fiew AS SELECT a * b, c FROM SELECT foo(); CREATE OR REPLACE FUNCTION foo(INTEGER) RETURNS SETOF t2 ...
In this case it would not allow the replace, since the function has both type and interface dependencies and you're changing both the type and the interface.
The idea is to use the NOOVERLOAD feature on functions that would be used as an interface for the front-end, where the addition or modification of a parameter or a result column is quite common, and functions very rarely need or use overloading features.
Please have a look at my reply to the sister thread. Cheers, Ezequiel Tolnay ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster