summaryrefslogtreecommitdiffstats
path: root/extra/sql_dumps/dump_release_extid.sql
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-13 00:23:09 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-13 00:23:09 -0700
commit9f25d84accb5a3657cb4c7dd87014d9f13ccf2ef (patch)
tree4854b13512c65fd0bffddfb791c4c014a41088dc /extra/sql_dumps/dump_release_extid.sql
parentaa9abbbab67c6344d382a964b3c451e0bf212efe (diff)
downloadfatcat-9f25d84accb5a3657cb4c7dd87014d9f13ccf2ef.tar.gz
fatcat-9f25d84accb5a3657cb4c7dd87014d9f13ccf2ef.zip
improve dump scripts
Diffstat (limited to 'extra/sql_dumps/dump_release_extid.sql')
-rw-r--r--extra/sql_dumps/dump_release_extid.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/extra/sql_dumps/dump_release_extid.sql b/extra/sql_dumps/dump_release_extid.sql
new file mode 100644
index 00000000..5e93cb1d
--- /dev/null
+++ b/extra/sql_dumps/dump_release_extid.sql
@@ -0,0 +1,12 @@
+
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE;
+
+COPY (SELECT release_ident.id, release_rev.id, release_rev.doi, release_rev.pmcid, release_rev.pmid,
+ release_rev.core_id, release_rev.wikidata_qid
+ FROM release_rev
+ INNER JOIN release_ident ON release_ident.rev_id = release_rev.id
+ WHERE release_ident.is_live = 't' AND release_ident.redirect_id IS NULL)
+ TO STDOUT
+ WITH NULL '';
+
+ROLLBACK;