2 -- Update some information about the track having been played.
3 -- This is kind of trivial for now, but we expect to see more logic in
5 CREATE or REPLACE FUNCTION track_played( TEXT ) RETURNS TEXT AS '
9 INSERT INTO played ( hash_key, req_at ) VALUES( in_hash , current_timestamp );
15 CREATE or REPLACE FUNCTION translation_of( TEXT ) RETURNS TEXT AS '
20 SELECT translated INTO out_text FROM translations WHERE in_text ~* original ;
28 CREATE or REPLACE FUNCTION fix_artists() RETURNS INT AS '
29 update tracks set artist = translation_of(artist) where artist != translation_of(artist);