bh
12/31/2021, 10:24 AMsilentworks
12/31/2021, 10:28 AMsilentworks
12/31/2021, 10:28 AMbh
12/31/2021, 10:33 AMbh
12/31/2021, 10:33 AMbh
12/31/2021, 10:34 AMsilentworks
12/31/2021, 10:35 AMbh
12/31/2021, 10:35 AMbh
12/31/2021, 10:35 AMsilentworks
12/31/2021, 10:36 AMsilentworks
12/31/2021, 10:36 AMsilentworks
12/31/2021, 10:36 AMbh
12/31/2021, 10:37 AMbh
12/31/2021, 10:37 AMsilentworks
12/31/2021, 10:37 AMbh
12/31/2021, 10:38 AMbh
12/31/2021, 10:38 AMbh
12/31/2021, 10:39 AMsilentworks
12/31/2021, 10:40 AMbh
12/31/2021, 10:42 AMbh
12/31/2021, 10:43 AMbh
12/31/2021, 10:43 AMbh
12/31/2021, 10:43 AMbh
12/31/2021, 10:43 AMbh
12/31/2021, 10:44 AMbh
12/31/2021, 10:47 AMbh
12/31/2021, 11:30 AMbh
12/31/2021, 11:49 AMcreate or replace function num_reservations(t_id integer) returns integer as $$
declare
reservation_count integer;
begin
SELECT count(member_id) into reservation_count
from thebookshelf.reservation
where title_id = t_id;
return reservation_count;
end;
$$ language plpgsql security definer;
bh
12/31/2021, 11:50 AMsilentworks
12/31/2021, 11:51 AM.rpc('num_reservations', { t_id: 1})
silentworks
12/31/2021, 11:51 AMbh
12/31/2021, 11:52 AMsilentworks
12/31/2021, 11:52 AMbh
12/31/2021, 11:53 AMbh
12/31/2021, 11:55 AMbh
12/31/2021, 11:55 AMSteve
12/31/2021, 6:48 PMbh
12/31/2021, 6:52 PM