postgresql - Export Database into CSV file - Stack Overflow
tables RECORD;
statement TEXT;
FOR tables IN
SELECT (table_schema || '.' || table_name) AS schema_table
FROM information_schema.tables t INNER JOIN information_schema.schemata s
ON s.schema_name = t.table_schema
WHERE t.table_schema NOT IN ('pg_catalog', 'information_schema', 'configuration')
AND t.table_type NOT IN ('VIEW')
ORDER BY schema_table
statement := 'COPY ' || tables.schema_table || ' TO ''' || path || '/' || tables.schema_table || '.csv' ||''' DELIMITER '';'' CSV HEADER';
EXECUTE statement;
$$ LANGUAGE plpgsql;
october 2018
« earlier      
10.1 3faiths 59 abraham abrahamic accelerators admin advertising aen africa afroz aggregation agreement ai ajax analytics android angel angellist anonymous antisemitism apache apps arab arabic archive art astronomy audio australia autocomplete autosuggest backup balanced band bands barnardos beekeeping bees bitcoin blog book bookhabit books bootup branding broadband broadcasting browser bruce bunchball burial business calculator cartoon cartoons catalyst ccj celsias change cheatsheet children christian citizen clare climate clock clone cms code codecs colo colors colours comedy comics community communitytv comparison compassion compatibility competition computerworld config configuration conversion convert copy corpus courses cpan crack crisis crowdsourcing css culture cyrus data dave deaf debian dedicated design developer dialog dictionary digital discipline discount distribution diversity diy dl360 dns documentary documentation domains dovecot dvd e71 earth economics economist economy editing education eee engine english entrepreneurship environment esther etch ethnic ethnicity events exim experiment facebook fatwa ffmpeg filetype:pdf filter firefox flash flu flv fodder fonts food force forms forward foundation free freedom freelex funerals gadgets game games gamification garland gaza geek gender git google governance government graph greylist groupware hack hamas happiness hardy hate health hebrew herald hezbollah history hole holocaust home honey hosting howto hp humour hyperstart ibm icecast icehouse ie ifttt images imap incubator index innovation inspiration install interface interfaith international internet internetnz investment iphone iptv islam israel israeli iss javascript jewish jobs johanna jordan journalism jquery judaism karen kate kde kernel kids klezmer kubuntu la labels language learning legal lexicography linguistics linux log logging mac made magazine mail mailarbiter mailman malware management manawatu manifesto manual maori map maps marketing mashable matapuna maths media media:document media:image men metering mideast midi mintchicks moderate monitor moskovitz mp3 multimedia music musichype muslim mysql natural network networking news newspaper ngo notation ny nz nzangels nzsl oed online open opensource openstreetmap oslo outsourcing oxford page pagerank palestine parenthesis parenting pc peace people performance perl philanthropy phishing phone photo photos php physics piracy pitch planets plans player plugin podcast poetry poetryinhell politics positive postfix postgres postgresql poverty power presentation press pretty pricing print privacy product programming project proxy psychology public publish purim qemu racism radio raid rank ranking rap rbl reading recession recognition recovery reference regex release religion research resources restaurants restore review ringelblum rss ruby rules saas sata science search section security server service sheet shopping sign sil simple sleep smacking social socialcommerce socialmedia software solar source space spam spamassassin spamikaze speech sphinx splice sql squid ssh ssl star startup startups startupweekend station statistics stats stefan stock storage story strategy stream streaming stress suse switzerland symbols sysadmin system tahara tarpit tax tech technology term terms terrorism testing themes theory times tips tls tolerance tool tools transcode translation travel trends tricks trope trust tuning tutorial tv tvnz ubuntu uk unicode urewera urls us usa usability usb utf-8 utilities ux valuation vc vi via:popular video violin virtual virus vista visualisation vmware vps war weather web webfund webmail weightloss wellington wikipedia windows wine wired women word wordpress world wpmu writing x306m xandros xero xkcd xp ycombinator yesvote yiddish youtube zwartz

Copy this bookmark: