--- getfeed.sql 2007/03/15 10:31:41 2 +++ getfeed.sql 2008/03/15 21:06:51 3 @@ -1,4 +1,4 @@ -create type blog as (feed text, title text, content text, pubdate timestamptz, link text); +create type blog as (feed text, title text, content text, pubdate timestamptz, author text, link text); create or replace function getfeed(text) returns setof blog @@ -17,6 +17,7 @@ content => $entry->content->body, link => $entry->link, pubdate => $entry->issued, + author => $entry->author, }); } @@ -24,9 +25,9 @@ $$; create view my_feeds as -select feed,title,content,pubdate,link from getfeed('http://blog.rot13.org/index.xml') +select feed,author,title,content,pubdate,link from getfeed('http://blog.rot13.org/index.xml') union -select feed,title,content,pubdate,link from getfeed('http://saturn.ffzg.hr/noauth/feed/workspace/rot13?category=Recent%20Changes;type=Atom') +select feed,author,title,content,pubdate,link from getfeed('http://saturn.ffzg.hr/noauth/feed/workspace/rot13?category=Recent%20Changes;type=Atom') ; -- if your terminal isn't iso-8859-2, change this! @@ -39,7 +40,7 @@ ; select - feed,title,substr(content,0,50),pubdate,link + feed,author,title,substr(content,0,50),pubdate,link from feeds order by pubdate desc limit 30