count_subalbums_by_album
Count the number of sub-albums in a particular album.
To retrieve the number of sub-albums in a particular album.
CREATE FUNCTION count_subalbums_by_album(integer, integer, varchar[]) returns bigint AS ' select count(identifier) from album where parent_album = $1 and can_access_album(identifier, $2, $3); ' LANGUAGE 'sql';
Version 2.29
Still in use
= Version 2.29 =
CREATE FUNCTION count_subalbums_by_album(integer) returns bigint AS 'select count(identifier) from album where parent_album = $1' LANGUAGE 'sql';
CREATE FUNCTION count_subalbums_by_album(integer, integer) returns bigint AS 'select count(identifier) from album where parent_album = $1 and access_rights <= $2' LANGUAGE 'sql';
= Version 2.34 =
DROP FUNCTION count_subalbums_by_album(integer); DROP FUNCTION count_subalbums_by_album(integer, integer); CREATE OR REPLACE FUNCTION count_subalbums_by_album(integer, integer, varchar[]) returns bigint AS ' select count(identifier) from album where parent_album = $1 and can_access_album(identifier, $2, $3); ' LANGUAGE 'sql';