/[pg-getfeed]/getfeed.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /getfeed.sql

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by dpavlin, Thu Mar 15 10:26:22 2007 UTC revision 2 by dpavlin, Thu Mar 15 10:31:41 2007 UTC
# Line 24  as $$ Line 24  as $$
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    ;

Legend:
Removed from v.1  
changed lines
  Added in v.2

  ViewVC Help
Powered by ViewVC 1.1.26