blob: db3ad09ec267e29df7c751e61217dc690dd8ecf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
drop function general.get_galleries ();
create or replace function general.get_galleries ()
returns setof general.gallery_t
as $$
begin
return query
select g.id,
g.description,
g.filename,
g.mime_type,
g.video_embed_url,
case
when g.content is null then null
else substring(g.content::text from 3)
end as content,
g.created,
g.modified
from general.gallery g
order by g.modified desc;
return;
end;
$$ language plpgsql;
|