# Poco::Data::PostgreSQL

# class Connector

Library: Data/PostgreSQL
Package: PostgreSQL
Header: Poco/Data/PostgreSQL/Connector.h

## Description

Connector instantiates PostgreSQL SessionImpl objects.

## Inheritance

Direct Base Classes: Poco::Data::Connector

All Base Classes: Poco::Data::Connector

## Member Summary

Member Functions: createSession, name, registerConnector, unregisterConnector

Inherited Functions: createSession, name

## Constructors

### Connector

Connector();

Creates the Connector.

## Destructor

### ~Connector

~Connector() override;

Destroys the Connector.

## Member Functions

### createSession

Poco::Data::SessionImpl::Ptr createSession(
const std::string & aConnectionString,
std::size_t aTimeout = Poco::Data::SessionImpl::LOGIN_TIMEOUT_DEFAULT
) override;

Creates a PostgreSQL SessionImpl object and initializes it with the given connectionString.

### name

const std::string & name() const override;

Returns the name associated with this connector.

See also: Poco::Data::Connector::name()

### registerConnector

static void registerConnector();

Registers the Connector under the Keyword Connector::KEY at the Poco::Data::SessionFactory

### unregisterConnector

static void unregisterConnector();

Unregisters the Connector under the Keyword Connector::KEY at the Poco::Data::SessionFactory

## Variables

### KEY

static const std::string KEY;