params.put(APPLICATION_NAME, "pgjdbc app");
params.put(CLIENT_ENCODING, "UTF8");
params.put(DATABASE, context.getSetting(DATABASE, ""));
params.put(CREDENTIALS_USERNAME, context.getSetting(CREDENTIALS_USERNAME, ""));
StartupCommand startup = protocol.createStartup(params);
protocol.execute(startup);
Notice error = startup.getError();
if (error != null) {
throw new NoticeException("Startup Failed", error);
}
}