When this blog switched servers, the Email::Valid module was missing. Now I’ve put it back and comments can be made. (Will I regret this?)
It doesn’t seem to turn on no mo'.
I didn’t use the mp3 part much; but, I miss listening to CBC Radio One while commuting to work already.
I had a rather complicated view where I needed to duplicate each row and change one column in every other row. I came up with this function:
-- Function: numbers(count int4)
-- DROP FUNCTION numbers(count int4);
CREATE OR REPLACE FUNCTION numbers(count int4)
RETURNS SETOF int4 AS
$BODY$
BEGIN
-- Usage: select * from numbers(10)
-- returns a column of integers from 0 to 9
--
for i in 0 .. count - 1 loop
return next i ;
end loop ;
return ;
END ;
$BODY$
LANGUAGE 'plpgsql' IMMUTABLE;
To make 3 copies of each row of table I could use the following:
select * from mytable,numbers(3)
After several weeks, Finnegan’s owners know how to give treats and, in return, the dog does “sit”, “down”, “stay”, “come” and “heel” among other things. Finnegan learned by himself that when this owner gets the small bowls from the cupboard and the scoop from the drawer means that ice cream will be served and he’ll get in some licks. He also knows that if my son or I are peeing in the toilet then, very shortly, there will be fresh cold water after the flush.
Copyright © 2002-2006 James (Jim) R. R. Service (@gmail.com - jservice)