Read handles from the new plc mirror
parent
9cc2572666
commit
de51bd9015
|
@ -50,5 +50,13 @@ EOF
|
||||||
|
|
||||||
# ------------------------------ Dump handles from plc-mirror ----------------------------------
|
# ------------------------------ Dump handles from plc-mirror ----------------------------------
|
||||||
|
|
||||||
docker exec -t plc-postgres-1 psql -U postgres -d plc \
|
docker compose exec -iT postgres psql -U postgres -d bluesky <<- EOF | sed -E -e 's/([^\\])\\",/\1\\\\",/g' > handles.csv
|
||||||
-c 'copy (select handle, did as "did:ID" from actors) to stdout with (format csv , header, force_quote ("handle"));' | sed -E -e 's/([^\\])\\",/\1\\\\",/g' > handles.csv
|
\timing
|
||||||
|
select did as "did:ID", replace(operation['alsoKnownAs'] ->> 0, 'at://', '') as handle
|
||||||
|
from plc_log_entries
|
||||||
|
where (did, plc_timestamp) in (
|
||||||
|
select did, max(plc_timestamp) as plc_timestamp from plc_log_entries
|
||||||
|
where not nullified
|
||||||
|
group by did
|
||||||
|
)
|
||||||
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue