Skip to content

Instantly share code, notes, and snippets.

@judell
Created May 3, 2023 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save judell/57e9055bcc6f12b5c8a854acfad8a6a3 to your computer and use it in GitHub Desktop.
Save judell/57e9055bcc6f12b5c8a854acfad8a6a3 to your computer and use it in GitHub Desktop.
update-home-timeline
with data as (
select
account,
account_url,
content,
created_at,
display_name,
followers,
following,
id,
in_reply_to_account_id,
instance_qualified_account_url,
instance_qualified_reblog_url,
instance_qualified_url,
list_id,
query,
reblog,
reblog_content,
reblog_server,
reblog_username,
reblogs_count,
replies_count,
server,
status,
url,
username
from
mastodon_toot_home
limit 400
)
insert into public.p_mastodon_home_timeline (
account,
account_url,
content,
created_at,
display_name,
followers,
following,
id,
in_reply_to_account_id,
instance_qualified_account_url,
instance_qualified_reblog_url,
instance_qualified_url,
list_id,
query,
reblog,
reblog_content,
reblog_server,
reblog_username,
reblogs_count,
replies_count,
server,
status,
url,
username
)
select
*
from
data
where
id not in ( select t.id from public.p_mastodon_home_timeline t )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment