SQL: covert backup file from copy format to insert format

Posted by takeshin on Stack Overflow See other posts from Stack Overflow or by takeshin
Published on 2010-05-13T13:20:57Z Indexed on 2010/05/13 13:24 UTC
Read the original article Hit count: 209

Filed under:
|
|
|

I have a PostgreSQL backup made with PHPPgadmin using Export > Copy (instead Copy > SQL which is actually what I need).

File contains entries like this:

COPY tablename(id, field) FROM stdin;
...

How to convert this file to SQL format?

INSERT INTO tablename...

I want to use Pgadmin to to import this file using execute SQL command.

© Stack Overflow or respective owner

Related posts about sql

Related posts about postgresql