470,647 Members | 1,268 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

Spaces and comments in pgplsql

Hello,
I have a question about pgplsql:

Is it faster to execute a compact function (with minimal spaces and comments)
than a function with many comments and many spaces?

In others words, which one will be faster? AAAAA_function or BBBBB_function ?

CREATE FUNCTION AAAAA_function RETURNS INTEGER AS '
DECLARE
a_var INTEGER;
BEGIN
SELECT SUM(field) INTO a_var FROM a_table;
RETURN a_var;
END;
' LANGUAGE 'plpgsql';

CREATE FUNCTION BBBBB_function RETURNS INTEGER AS '
DECLARE

--
-- Bla bla bla
--
a_var INTEGER; -- Lot of spaces...

BEGIN

--
-- Rebla bla bla
--

SELECT SUM( field ) INTO a_var FROM a_table ; -- Selecting...

-- ...

RETURN a_var ;

END;
' LANGUAGE 'plpgsql';
Thank you very much

Luc

Jul 19 '05 #1
0 1888

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by bearophileHUGS | last post: by
5 posts views Thread by Christian Traber | last post: by
2 posts views Thread by Kuti Attila | last post: by
1 post views Thread by Howard | last post: by
135 posts views Thread by Xah Lee | last post: by
reply views Thread by Didje | last post: by
2 posts views Thread by watusiboy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.