#include <stdio.h>
#include <stdlib.h>
#include <string.h>

EXEC SQL INCLUDE ../regression;

int main(int argc, char* argv[]) {
  EXEC SQL BEGIN DECLARE SECTION;
    char var[25];
  EXEC SQL END DECLARE SECTION;

  ECPGdebug(1, stderr);
  EXEC SQL CONNECT TO REGRESSDB1;

  EXEC SQL WHENEVER SQLWARNING SQLPRINT;
  EXEC SQL WHENEVER SQLERROR SQLPRINT;

  EXEC SQL SHOW search_path INTO :var;
  printf("Var: Search path: %s\n", var);

  EXEC SQL SHOW wal_buffers INTO :var;
  printf("Var: WAL buffers: %s\n", var);

  EXEC SQL SHOW standard_conforming_strings INTO :var;
  printf("Var: Standard conforming strings: %s\n", var);

  EXEC SQL SHOW TIME ZONE INTO :var;
  printf("Time Zone: %s\n", var);

  EXEC SQL SHOW TRANSACTION ISOLATION LEVEL INTO :var;
  printf("Transaction isolation level: %s\n", var);

  /* Do not ask for the user name, it may differ in a regression test */
  /* EXEC SQL SHOW SESSION AUTHORIZATION INTO :var; */

  EXEC SQL DISCONNECT ALL;

  return 0;
}
