ERROR:  could not write block 4687 of temporary file: No space left on device
HINT:  Perhaps out of disk space?

select distinct,a.title,to_char(a.etm, 'FMDay,Month FMDD,IYYY') as etm,to_char(a.etm,'HH:MI PM') as etm1,case when a.sub_ctg != -1  then (select nam from ewf.sub_category where id=a.sub_ctg) when a.ctg=1 then 'TaajaVarthalu' else (select nam from ewf.category where id=ctg) end  cde from ewf.story a where a.ctg not in(13,14,15,16,17) order by desc OFFSET (1*20)-20  limit 20