src/tutorial/funcs.source: Wrong comment?

Started by Daniel Westermann (DWE)almost 5 years ago3 messages
#1Daniel Westermann (DWE)
daniel.westermann@dbi-services.com

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Daniel Westermann (DWE) (#1)
Re: src/tutorial/funcs.source: Wrong comment?

"Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com> writes:

in "src/tutorial/funcs.source" there is this block:
...
Actually it does work and I do not see a reason why this still should be commented. Thoughts?

Agreed and done.

regards, tom lane

#3Daniel Westermann (DWE)
daniel.westermann@dbi-services.com
In reply to: Tom Lane (#2)
Re: src/tutorial/funcs.source: Wrong comment?

"Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com> writes:

in "src/tutorial/funcs.source" there is this block:
...
Actually it does work and I do not see a reason why this still should be commented. Thoughts?

Agreed and done.

Thanks, Tom