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