return site_id from query_catalog

This commit is contained in:
towards-a-new-leftypol 2023-11-10 02:22:35 -05:00
parent 458573792d
commit 8820330ff5
1 changed files with 4 additions and 2 deletions

View File

@ -217,7 +217,8 @@ RETURNS TABLE (
thread_id bigint,
board_thread_id bigint,
pathpart text,
name text
site_name text,
site_id int
) AS $$
WITH
top AS
@ -257,7 +258,8 @@ RETURNS TABLE (
op_posts.*,
threads.board_thread_id,
boards.pathpart,
sites."name"
sites."name",
sites.site_id
FROM op_posts
JOIN post_counts ON op_posts.thread_id = post_counts.thread_id
JOIN threads ON op_posts.thread_id = threads.thread_id