config.inc 964 B

1234567891011121314151617181920212223
  1. <?php
  2. // These vars are used to connect db and create test table.
  3. // values can be set to meet your environment with the
  4. // environment var PGSQL_TEST_CONNSTR
  5. // "test" database must exist. i.e. "createdb test" before testing
  6. $conn_str = getenv('PGSQL_TEST_CONNSTR') ?: "host=localhost dbname=test port=5432 user=postgres password=postgres"; // connection string
  7. $table_name = "php_pgsql_test"; // test table that will be created
  8. $table_name_92 = "php_pgsql_test_92"; // test table that will be created
  9. $num_test_record = 1000; // Number of records to create
  10. // Test view
  11. $view_name = "php_pgsql_viewtest";
  12. $view_def = "CREATE VIEW {$view_name} AS SELECT * FROM {$table_name};";
  13. // Test table
  14. $table_def = "CREATE TABLE ${table_name} (num int, str text, bin bytea);";
  15. $table_def_92 = "CREATE TABLE ${table_name_92} (textary text[], jsn json);";
  16. $field_name = "num"; // For pg_field_num()
  17. ?>