Tag Archives: databases

PostgreSQL dump and restore database command

For my own records. Dump: pg_dump -U superuser -C -o database > database And then the restore (postgres should be the template db): psql postgres superuser < database

Posted in Geek Stuff | Tagged , , , | Leave a comment

Mysql split column string into rows

A MySQL recipe, that you can use to split a cell value by a known separator into different rows, in some way similar to the PHP explode function or split in PERL. To turn this: id value 1 4,5,7 2 … Continue reading

Posted in Geek Stuff | Tagged , , , , , | 22 Comments