Closed iangow closed 4 years ago
I did this on my server here:
igow@igow-ubuntu-mate:~/git/edgar$ psql
psql (12.3 (Ubuntu 12.3-1.pgdg20.04+1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.
crsp=# DELETE FROM edgar.filing_docs WHERE document ~ '\s+';
DELETE 41185
crsp=# \q
Oops. This is the query I should've run:
igow@igow-z640:~/git/wrds_pg$ psql
psql (12.3 (Ubuntu 12.3-1.pgdg18.04+1), server 11.8 (Ubuntu 11.8-1.pgdg18.04+1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.
crsp=# DELETE FROM edgar.filing_docs WHERE file_name IN (
SELECT file_name FROM edgar.filing_docs WHERE document ~ '\s+');
DELETE 573983
crsp=#
Once deleted, re-running with revised should re-populate with correct values. It may be necessary to delete by
file_name
to trigger reprocessing.