damon.cognito wrote:First I want to dump the schema, tables and views only but it also includes sequences which I am pretty sure the code below shouldn't:
Your code adds the sequences that are used for table serial columns to a dump file. Other sequences are not added. If you want to add all the sequences, also add PgSqlDumpObjects.Sequences to ObjectTypes.
damon.cognito wrote:ObjectTypes = PgSqlDumpObjects.Schemas ^ PgSqlDumpObjects.Tables ^ PgSqlDumpObjects.Views
Please also note that you use the XOR (^) operator for specifying several PgSqlDumpObjects. This does not cause errors in this example, but this is incorrect and potentially leads to errors in other cases. It's better to use the OR (|) operator for this purpose:
Code: Select all
ObjectTypes = PgSqlDumpObjects.Schemas | PgSqlDumpObjects.Tables | PgSqlDumpObjects.Views
damon.cognito wrote:Secondly, the sequences have owners set whereas the Tables do not.
We have reproduced the issue. Starting from next public build of dotConnect for PostgreSQL "OWNER TO" statements for sequences will not be added to the backup script. We will post here when the corresponding build of dotConnect for PostgreSQL is available for download.