Table of Contents

Class PostgreSqlDatasourceConnection

Namespace
YndigoBlue.Velocity.Connections
Assembly
YndigoBlue.Velocity.dll

Connection configuration for PostgreSQL databases.

public class PostgreSqlDatasourceConnection : DatasourceConnection, IDatasourceConnection
Inheritance
PostgreSqlDatasourceConnection
Implements

Examples

// Connect to PostgreSQL with standard configuration
var conn = new PostgreSqlDatasourceConnection
{
    Hostname = "localhost",
    Port = 5432,
    Database = "mydb",
    Username = "postgres",
    Password = "mypassword"
};

using (var m = new Manager(conn))
{
    var schema = m.LoadSchema("public");
    var table = schema["users"];
    // Perform database operations
}

Remarks

Supports PostgreSQL 12 and later versions.

Default port: 5432

PostgreSQL provides excellent support for geospatial data through the PostGIS extension.

Properties

DatasourceType

Gets the datasource type for PostgreSQL.