PgSqlDump restore fails with Dump data's date format
Posted: Mon 26 Nov 2012 11:59
Hi all,
I am using dotConnect to PostgreSQL 6.2.77.0
I have a pgsqldump routine to create a backup file and I am testing the file by restoring it.
When using
it fails with a date /time error.
I am presuming it is because the pg wants it in yyyy-mm-dd format.
A quick search in the 1Gb text file produced by the dump function shows that most data is in the american format.
dunmp uses the basic code:
Regards
I am using dotConnect to PostgreSQL 6.2.77.0
I have a pgsqldump routine to create a backup file and I am testing the file by restoring it.
When using
Code: Select all
DataRestore.Restore(RestoreString);
I think this is from one of the earlies linesdate/time field value out of range: \"31/12/9999\"
If the dump function created this line why cannot the restore function restore with it?CREATE USER **** WITH SYSID 16395 PASSWORD '****' CREATEDB CREATEUSER VALID UNTIL '31/12/9999';
I am presuming it is because the pg wants it in yyyy-mm-dd format.
A quick search in the 1Gb text file produced by the dump function shows that most data is in the american format.
dunmp uses the basic code:
Code: Select all
var myConnection = new CSLConnect(UserName, Password, Port, HostName, DBName);
if (myConnection.Login())
{
using (var dataBackup = new PgSqlDump()
{
Connection = myConnection.getConnection(),
IncludeBlob = true,
ObjectTypes = PgSqlDumpObjects.All,
GenerateHeader = true,
Mode = DumpMode.All
})
{
dataBackup.Backup(Path.Combine(Destination, BackupName + ".backup"));
}
myConnection.Logout();
}