Last active
August 29, 2015 14:05
-
-
Save unicolet/625dbd6d5c99ee551922 to your computer and use it in GitHub Desktop.
Extract copy instructions from a postgres dump in SQL format.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN {start=0} | |
/^COPY "/ { if(index($0,TBL)!=0) { start=1; } } | |
// {if(start==1) print $0;} | |
/\\\./ {start=0;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment