]> git.nbdom.net Git - nb.git/commitdiff
lib/postgres/mime.sql
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 9 Jan 2018 03:25:51 +0000 (03:25 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 9 Jan 2018 03:25:51 +0000 (03:25 +0000)
lib/postgres/mime.sql

index e5d1130975451b1937ba978481ace2f5a368d0de..6ca0a66b9b7b91099aa8238e1907ca7685de76d7 100644 (file)
@@ -716,5 +716,6 @@ COPY tmp_mime FROM PROGRAM 'true && curl -s \
 https://gist.githubusercontent.com/electerious/3d5a31a73cfd6423f835c074ab25fc06/raw/d48b8410e9aa6746cfd946bca21a1bb54c351c4e/Caddyfile \
 | sed -e "s/^ *//" -e "/^[^\.]/d" -e "s/ /\t/" -e "s/$/\t/" -e "s/^\.//" \
 ' WITH (format 'text', NULL '');
+DELETE FROM tmp_mime WHERE LENGTH(ext)>4;
 INSERT INTO mime SELECT * FROM tmp_mime ON CONFLICT DO NOTHING;
 COMMIT;