ERROR:  syntax error at or near ","
LINE 1: ... as path from ewf.story_12 a  WHERE a.sub_ctg IN (, ) order ...
                                                             ^

select a.id,a.title,substr(a.gist,1,400) as story,to_char(a.etm, 'FMDay,Month FMDD,IYYY') || ' [' || (select tmp.interval_time1(a.etm::text)) || ']' as etm,img_path as path from ewf.story_12 a  WHERE a.sub_ctg IN (, ) order by a.id desc OFFSET (1*7)-7  limit 7