Quando eu executo:
CREATE VIEW foreign_keys AS
SELECT
tc.table_name, kcu.column_name, ccu.table_name AS foreign_table_name,
ccu.column_name AS foreign_column_name
FROM
information_schema.table_constraints AS tc, information_schema.key_column_usage AS kcu,
information_schema.constraint_column_usage AS ccu
WHERE
tc.constraint_type = 'FOREIGN KEY' AND tc.constraint_name = kcu.constraint_name AND
ccu.constraint_name = tc.constraint_name;
CREATE FUNCTION GetPermissionColumns() RETURNS TABLE(column_name foreign_keys.column_name%TYPE)
AS $$
BEGIN
RETURN QUERY SELECT column_name FROM foreign_keys WHERE table_name = tg_table_name AND
foreign_table_name = 'permission';
END;
$$ LANGUAGE plpgsql;
no Postgresql 9.3, recebo a seguinte mensagem de aviso:
type reference foreign_keys.column_name%TYPE converted to information_schema.sql_identifier (SQL State: 00000 - Error Code: 0)
O que estou fazendo de errado e como posso corrigir?
Respondendo a minha própria pergunta...
Acontece que este é um registro inofensivo no nível da INFORMAÇÃO: https://stackoverflow.com/a/3531274/14731