Passing a ResultSet into a Postgresql Function
问题 Is it possible to pass the results of a postgres query as an input into another function? As a very contrived example, say I have one query like SELECT id, name FROM users LIMIT 50 and I want to create a function my_function that takes the resultset of the first query and returns the minimum id. Is this possible in pl/pgsql? SELECT my_function(SELECT id, name FROM Users LIMIT 50); --returns 50 回答1: It is not possible to pass an array of generic type RECORD to a plpgsql function which is