postgresql - C#: pg_restore to different schema -
i have .net application trying data dump using pg_dump , restore using pg_restore.
here data dump code:
public string getstringargument() { return string.format("-i -h {0} -p {1} -u {2} -f c -b -v -f {3} -n {4} {5}", _dbcredential.server, _dbcredential.port.tostring(), _dbcredential.user, getfilename(), "public", _dbcredential.database); }
i'm getting datatables on public schema.
now need restore data dump on postgres server using pg_restore.
public string getstringargument() { return string.format("-i -h {0} -p {1} -u {2} -d {3} {4}", _dbcredential.server, _dbcredential.port.tostring(), _dbcredential.user, _dbcredential.database, _dbcredential.backuppath); }
but need restore data bump different data schema called stack.
this windows service application , cann't manual script changes.
how can restore data dump different schema ?
appreciate feedback!!
there no way restore different schema using pg_restore
all can restore default schema(whatever schema got data base) , rename it.
Comments
Post a Comment