0
有人可以幫我修復下面的代碼,以便它返回所有不在數組中傳遞給函數的記錄嗎?該數組包含pKey值。謝謝。如何使用postgresql使用數組和集合?
CREATE OR REPLACE FUNCTION func_getProperty(propertiesID integer[])
RETURNS refcursor AS
$BODY$
declare mycursor refcursor;
BEGIN
mycursor = 'mycursor';
OPEN mycursor FOR (select distinct property1, property2
from properties
where propertyid not in (propertiesID));
RETURN mycursor;
END;