Convert the PostgreSQL data table to excel and postgresqlexcel
COPYExchange data between PostgreSQL tables and standard file system files.COPYTOCopy all contents of a tableToOne file, whileCOPYFROMSlaveCopy data from a file to a table (attach the data to the existing content in the table ).
COPY table name TO 'file name .csv 'csv header;
Note: CSV
Open the comma-separated variable (CSV) mode.
HEADER
The Declaration file contains a header identification line that contains the name of each field in the file. When output, the first row contains the table field name. When input, the first row is ignored.
With file nameCOPYInstruct the PostgreSQL server to read and write data directly from the file. If the file name is declared, the file must be visible to the server, and the file name must be declared from the server's perspective. If the declaredSTDINOrSTDOUTData flows between the customer's front-end and server through connections.
Http://www.php100.com/manual/PostgreSQL8/sql-copy.html