I have created a simple function:
create function my fucnction(uuid, uuid, date) returns boolean as
$$
select ... from t where t.f1 = $1 and t.f2 = $2 and t.f3 = $3;
$$
language sql stable;
It would be great syntax-wise if I could access the input parameters as a single row (which would be equal to ($1, $2, $3) in my function), so I could write:
create function my fucnction(uuid, uuid, date) returns boolean as
$$
select ... from t where (t.f1, t.f2, t.f3) = <the input parameters row>;
$$
language sql stable;
which would be equal to:
create function my fucnction(uuid, uuid, date) returns boolean as
$$
select ... from t where (t.f1, t.f2, t.f3) = ($1, $2, $3);
$$
language sql stable;
Is this possible?
...where (t.f1, t.f2, t.f3) = ($1, $2, $3);This should work. Did you tested and it not works?($1, $2, $3). Something likeNEWandOLDwhich can be used in triggers. Does that exist?