src/tutorial/funcs.source: Wrong comment? - Mailing list pgsql-hackers

From Daniel Westermann (DWE)
Subject src/tutorial/funcs.source: Wrong comment?
Date
Msg-id GVAP278MB04242DCBF5E31F528D53FA18D2A90@GVAP278MB0424.CHEP278.PROD.OUTLOOK.COM
Whole thread Raw
Responses Re: src/tutorial/funcs.source: Wrong comment?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

in "src/tutorial/funcs.source" there is this block:


-----------------------------
-- Creating SQL Functions with multiple SQL statements
--      you can also create functions that do more than just a SELECT.
--
-- 14MAR99 Clark Evans: Does not quite work, commented out for now.
--
-----------------------------

-- you may have noticed that Andy has a negative salary. We'll create a
-- function that removes employees with negative salaries.
--
-- SELECT * FROM EMP;
--
-- CREATE FUNCTION clean_EMP () RETURNS integer
--        AS 'DELETE FROM EMP WHERE EMP.salary <= 0;
--                SELECT 1 AS ignore_this'
--        LANGUAGE SQL;
--
-- SELECT clean_EMP();
--
-- SELECT * FROM EMP;

Actually it does work and I do not see a reason why this still should be commented. Thoughts?

Regards
Daniel




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Yet another fast GiST build
Next
From: Dorian Hoxha
Date:
Subject: Alter timestamp without timezone to with timezone rewrites rows