I'm using PgSqlDump to dump out my DB to a file. If I use DumpMode.All (or don't specify the DumpMode) then it all works fine. The code I use is like this:
Code: Select all
using (PgSqlDump pgSqlDump = new PgSqlDump())
{
pgSqlDump.Connection = connection;
pgSqlDump.Tables = tableList;
pgSqlDump.IncludeBlob = true;
pgSqlDump.IncludeUsers = false;
pgSqlDump.IncludeDrop = false;
pgSqlDump.Backup(Path.Combine(saveFolder, "script.backup"));
}
However, if I want to dump out just the data I add
Code: Select all
pgSqlDump.Mode = DumpMode.Data;
Code: Select all
-- dotConnect for PostgreSQL 4.65.79.0
-- Server version: PostgreSQL 8.3.9 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Ubuntu 4.3.3-5ubuntu4) 4.3.3
-- Script date 11/11/2010 10:15:10 a.m.
-- Server: 192.168.1.31
-- Database: conductor
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET default_tablespace = '';
SET default_with_oids = false;
Thanks,
Simon.