Skip to content

v1.0 - July 2017

Choose a tag to compare

@ielizaga ielizaga released this 19 Jul 09:58
· 75 commits to master since this release

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>,....
  • Mock entire database
bin/mockd-mac <dbengine> -n <total rows> -u <user> -d <database> -x

Known Issues

  1. 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)
  2. Still having issues with Check constraint, only check that works is "COLUMN > 0"
  3. On Greenplum Datbase/HAWQ partition tables are not supported (due to check constraint issues defined above)
  4. Custom datatypes are not supported