Class AddPostgresDatabase
- java.lang.Object
-
- com.aoindustries.aoserv.examples.postgres.AddPostgresDatabase
-
public final class AddPostgresDatabase extends Object
Before creating a new PostgreSQL database, please make sure that a
User
has been added for use as the Database Administrator (DBA).The possible values for
encoding
may be found in thepostgres_encodings
table.- Author:
- AO Industries, Inc.
- See Also:
AddPostgresUser
,Encoding
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Database
addPostgresDatabase(AoservConnector conn, Database.Name name, Server.Name postgresServer, DomainName server, User.Name datdba, String encoding, boolean enablePostgis)
Adds aDatabase
to aHost
.static void
addPostgresDatabase(SimpleAoservClient aoClient, Database.Name name, Server.Name postgresServer, String server, User.Name datdba, String encoding, boolean enablePostgis)
Adds aDatabase
to aHost
.
-
-
-
Method Detail
-
addPostgresDatabase
public static void addPostgresDatabase(SimpleAoservClient aoClient, Database.Name name, Server.Name postgresServer, String server, User.Name datdba, String encoding, boolean enablePostgis) throws IOException, SQLException
Adds aDatabase
to aHost
.- Parameters:
aoClient
- theSimpleAoservClient
to usename
- the name of the database to addpostgresServer
- the name of the PostgreSQL serverserver
- the hostname of the server to add the database todatdba
- the username of the database administratorUser
encoding
- the encoding to useenablePostgis
- enables PostGIS on the database- Throws:
IOException
SQLException
-
addPostgresDatabase
public static Database addPostgresDatabase(AoservConnector conn, Database.Name name, Server.Name postgresServer, DomainName server, User.Name datdba, String encoding, boolean enablePostgis) throws IOException, SQLException
Adds aDatabase
to aHost
.- Parameters:
conn
- theAoservConnector
to usename
- the name of the database to addpostgresServer
- the name of the PostgreSQL serverserver
- the hostname of the server to add the database todatdba
- the username of the database administratorUser
encoding
- the encoding to useenablePostgis
- enables PostGIS on the database- Returns:
- the new
Database
- Throws:
IOException
SQLException
-
-