我有一个 SQL 函数,其参数名称为 id。但是,我有一个具有相同名称的列名 id。我如何告诉函数如何区分参数和列。如果我将参数名称从 id 更改为 num,我的函数将完美运行,但这不是这里的选项,我也无法更改列名。
create or replace function
test(id integer) return text
as $$
select address
from customers c
where c.id = id
$$ language sql;