PostgreSQL Connect Class

Summary

Creates a connection to a PostgreSQL database

Constructor

PostgreSQL Connect( array options)

Option Name Type Contents
Db_Name String The name of the Postgres database
NewDBFlag Boolean Whether a new database should be created (Default is "False")
ChooseDB Boolean Whether a dialog box should be shown for the user to pick the database, and login credentials
NoPooling Boolean Whether one or multiple connections are allowed (Default is "False")

Properties

Property Name Type Contents
dbname String The name of the Postgres database
NewDBFlag Boolean Whether a new database should be created (Default is "False")
ChooseDB Boolean Whether a dialog box should be shown for the user to pick the database, and login credentials
NoPooling Boolean Whether one or multiple connections are allowed (Default is "False")

Methods

Open()

Opens the connection

Example

pg_opts.db_name = "My Database"
pg_opts.NewDBFlag = "No"
pg_opts.NoPooling = "True" // we want only one connection so that when we close it, we can delete the db, etc
conn = CreateObject("   PostgreSQL Connect", pg_opts)
conn.Open()

See Also:

 

 

Alphabetical List of GISDK Classes

 

©2026 Caliper Corporation