Questions tagged «dollar-sign»


2
PL / pgSQL中的“ $$”是什么
对PL / pgSQL来说是全新的,此函数中双美元符号的含义是什么: CREATE OR REPLACE FUNCTION check_phone_number(text) RETURNS boolean AS $$ BEGIN IF NOT $1 ~ e'^\\+\\d{3}\\ \\d{3} \\d{3} \\d{3}$' THEN RAISE EXCEPTION 'Wrong formated string "%". Expected format is +999 999'; END IF; RETURN true; END; $$ LANGUAGE plpgsql STRICT IMMUTABLE; 我猜在RETURNS boolean AS $$中$$是占位符。 最后一行有点神秘: $$ LANGUAGE …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.