By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,304 Members | 1,283 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,304 IT Pros & Developers. It's quick & easy.

Spaces and comments in pgplsql

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.