5
Hello, I’m a beginner in postegrsql and I have the following question:
When we create functions in postgresql the following logic is usually used
CREATE FUNCTION func() RETURNS ret AS $$
BEGIN
...
END;
$$ LANGUAGE plpgsql;
From what I read the $$ are body delimiters of the function, I wonder if what this between the two $ has some extra function. I’ve seen functions where it’s only used $$, where it is used $BODY$ or also $function name$. Does this interfere with the function or schema? Is there any market standard?
The use of $$ or $something$ is just a facilitator to delimit the body of the function. In the older versions the body of the function between apostrophes was used (') but this created a problem if the in the body of the function you needed to use the apostrophe being necessary to duplicate or quadruple to function properly. Ah! , and the name is Postgresql.
– anonimo