Command Reference
./mockd-mac postgres -help
2017-07-16 10:58:43.609:INFO > Parsing all the command line arguments
Usage of postgres:
-d string
The database name where the table resides (default "postgres")
-h string
The hostname that can be used to connect to the database (default "localhost")
-i Ignore checking and fixing constraint issues
-n int
The total number of mocked rows that is needed (default 1)
-p int
The port that is used by the database engine (default 5432)
-t string
The table name to be filled in with mock data
-u string
The username that can be used to connect to the database (default "postgres")
-w string
The password for the user that can be used to connect to the database
-x Mock all the tables in the database
Examples
- Mock one table will random data
bin/mockd-mac <dbengine> -n <total rows> -u <user> -d <database> -t <table>
- Mock multiple table with random data
bin/mockd-mac <dbengine> -n <total rows> -u <user> -d <database> -t <table1>,<table2>,....
bin/mockd-mac <dbengine> -n <total rows> -u <user> -d <database> -x
Known Issues
- When using a small amount of rows and having defined a composite PK index, there are chances that the primary key would fail (this is due to foreign key fix only runs after primary key fix)
- Still having issues with Check constraint, only check that works is "COLUMN > 0"
- On Greenplum Datbase/HAWQ partition tables are not supported (due to check constraint issues defined above)
- Custom datatypes are not supported