Created
October 23, 2012 16:25
-
-
Save ojacobson/3939871 to your computer and use it in GitHub Desktop.
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
CREATE TEMPORARY TABLE foo_staging LIKE FOO; | |
-- replace with bulk insert if you like | |
\copy into foo_staging [...] | |
INSERT INTO foo | |
SELECT | |
foo_staging.* | |
FROM | |
foo_staging | |
LEFT JOIN foo USING (key, columns, here) | |
WHERE | |
foo.key IS NULL | |
AND foo.columns IS NULL | |
AND foo.here IS NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment