兼容WITH FUNCTION
atlasdb=# WITH FUNCTION withfunc(x INTEGER) RETURNS INTEGER AS $$
atlasdb$# BEGIN
atlasdb$# RETURN x+1;
atlasdb$# END
atlasdb$# $$,
atlasdb-# FUNCTION withfunc2(x INTEGER, y INTEGER) RETURNS INTEGER AS $$
atlasdb$# BEGIN
atlasdb$# RETURN x+y;
atlasdb$# END;
atlasdb$# $$,
atlasdb-# FUNCTION withfunc3(x TEXT) RETURNS TEXT AS $$
atlasdb$# BEGIN
atlasdb$# RETURN x || '-test';
atlasdb$# END;
atlasdb$# $$
atlasdb-# SELECT withfunc(1),withfunc2(2,3),withfunc3('4');
withfunc | withfunc2 | withfunc3
----------+-----------+-----------
2 | 5 | 4-test
(1 row)