Is there a difference between these two functions?
1st:
CREATE FUNCTION sales_tax(subtotal real) RETURNS real AS $$
BEGIN
RETURN subtotal * 0.06;
END;
$$ LANGUAGE plpgsql;
2nd:
CREATE OR REPLACE FUNCTION sales_tax(subtotal real) RETURNS real AS
$BODY$
begin
RETURN subtotal * 0.06;
end;
$BODY$
LANGUAGE plpgsql
Why does one have $$
and the other one have $body$
? (PostgreSQL)
What are '$$' used for in PL/pgSQL is not an answer to my question. is explains what is $
in general, and it doesn't refer to $body$
maybe one of them was the way to go in older versions and it might be depricit in future releases?