Vincenzo Romano <vincenzo.romano@xxxxxxxxxxx> writes: > I would like to understand the typo protection mentioned by Tom earlier: > I need to understand the reason for creating that special case. Well, case A: create function foo(out x int4) returns setof int8 ... This is indubitably a typo. Case B: create function foo(out x record) returns setof record ... Now what? Is the user expecting us to wrap x in an additional layer of composite, or not? Our current assumption is "not", but it would be pretty inconsistent to do that if x did get wrapped as long as it were any other type. Yes, we could have resolved that ambiguity in one direction or the other and then said that "returns record" or "returns setof record" is OK regardless of the number of OUT parameters, but we didn't. Considering that the SQL-standard syntax for this is TABLE(), and that hasn't got these issues in the first place, I don't feel any need to revisit the question. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general