Stuff
public text v1 · immutableSELECT *
FROM list_posts AS post
LEFT OUTER JOIN private ON (post.id = private.pid)
LEFT OUTER JOIN configuration AS config ON (config.key = \'official_user\')
LEFT OUTER JOIN count_comments AS ccount ON (post.id = ccount.pid)
WHERE
post.private = false --Post is not private
OR private.uid = %s --User is allowed to view post
OR config.value = config.value --User is the official_user
ORDER BY post.id desc