CREATE FUNCTION one() RETURNS integer AS $$
SELECT 1 AS result;
$$ LANGUAGE SQL;
why i cant write like this:
CREATE FUNCTION one() RETURNS integer
SELECT 1 AS result;
- what is
AS $$? - what is
$$ LANGUAGE SQL? - what is
$$?
CREATE FUNCTION one() RETURNS integer AS $$
SELECT 1 AS result;
$$ LANGUAGE SQL;
why i cant write like this:
CREATE FUNCTION one() RETURNS integer
SELECT 1 AS result;
AS $$?$$ LANGUAGE SQL?$$?Copyright © 2021 Jogjafile Inc.
In PostgreSQL it is a feature called dollar-quoting, which allows you to include a body of text without escaping the single quotes
Using it as
which is easier to read than
Read more here - https://www.postgresonline.com/journal/archives/376-Dollar-quoting-for-escaping-single-quotes.html