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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -