-
-
Save tarla/36b117fa91c029e46a91ddedef76cebe to your computer and use it in GitHub Desktop.
super query
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
SET TIME ZONE 'America/Sao_Paulo'; | |
\copy ( | |
select a,b,c,d from x | |
) TO '/tmp/arquivo.csv' DELIMITER ',' NULL 'NULL' CSV HEADER FORCE QUOTE a,b,c,d | |
SET TIME ZONE 'UTC'; | |
-- | |
\copy ( | |
SELECT | |
unnest(lala) AS lala | |
FROM lala LALA | |
WHERE lala = lala | |
AND lala.arrayXXX @> array[xxxItem]::bigint[] | |
) TO '/tmp/xxxx.csv' CSV DELIMITER ',' HEADER FORCE QUOTE lalaId; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment