summaryrefslogtreecommitdiffstats
path: root/extra/sql_dumps/dump_file_hashes.sql
blob: a84c2ee19cdd1aaeb8cde76da8d36a2471225e2d (plain)
1
2
3
4
5
6
7
8
9
10
11

BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE;

COPY (SELECT file_ident.id, file_rev.id, file_rev.sha1, file_rev.sha256, file_rev.md5
      FROM file_rev
      INNER JOIN file_ident ON file_ident.rev_id = file_rev.id
      WHERE file_ident.is_live = 't' AND file_ident.redirect_id IS NULL)
    TO STDOUT
    WITH NULL '';

ROLLBACK;