24 |
$$; |
$$; |
25 |
|
|
26 |
create view my_feeds as |
create view my_feeds as |
27 |
select feed,title,substr(content,0,80),pubdate,link from getfeed('http://blog.rot13.org/index.xml') |
select feed,title,content,pubdate,link from getfeed('http://blog.rot13.org/index.xml') |
28 |
union |
union |
29 |
select feed,title,substr(content,0,80),pubdate,link from getfeed('http://saturn.ffzg.hr/noauth/feed/workspace/rot13?category=Recent%20Changes;type=Atom') |
select feed,title,content,pubdate,link from getfeed('http://saturn.ffzg.hr/noauth/feed/workspace/rot13?category=Recent%20Changes;type=Atom') |
30 |
; |
; |
31 |
|
|
32 |
-- if your terminal isn't iso-8859-2, change this! |
-- if your terminal isn't iso-8859-2, change this! |
33 |
set client_encoding = 'iso-8859-2'; |
set client_encoding = 'iso-8859-2'; |
34 |
|
|
35 |
|
-- materialize view |
36 |
select * |
select * |
37 |
|
into feeds |
38 |
from my_feeds |
from my_feeds |
39 |
|
; |
40 |
|
|
41 |
|
select |
42 |
|
feed,title,substr(content,0,50),pubdate,link |
43 |
|
from feeds |
44 |
order by pubdate desc |
order by pubdate desc |
45 |
limit 10; |
limit 30 |
46 |
|
; |