PostgreSQL
This section provides information about configuration and application of the PostgreSql database. PostgreSQL is an object-relational open source database with a client-server infrastructure. The TwinCAT 3 database server uses the Npgsql API for connection.
Declaration in the TwinCAT Database Server Configurator
PostgreSql database | |
---|---|
Database type | Select "PostgreSql" from the drop-down menu. |
Server | Name or IP of the database server |
Database | Name of the database on the server |
Port | Port of the database |
Authentication | Database authentication method |
User name | Enter the user name. |
Password | Enter the corresponding password. |
Client Certificate | Path to used client certificate (.pfx) |
Client Certificate Password | Password of the referenced client certificate |
Windows CE support Under Windows CE this database is not supported by the TwinCAT Database Server. |
Data type mapping between DB and PLC
E_ColumnTypes | PostgreSQL | TwinCAT PLC |
---|---|---|
BigInt | Bigint | T_ULARGE_INTEGER (TcUtilities.lib) |
Integer | Integer | DINT |
SmallInt | Smallint | INT |
TinyInt |
| SINT |
Bit_ | Bit | BYTE |
Money | Money | LREAL |
Float | Double precision | LREAL |
Real_ | Real | REAL |
DateTime | Timestamp without time zone | DT |
NText | Text | STRING |
NChar | Character | STRING |
Image |
| ARRAY OF BYTE |
NVarChar | Character varying | STRING |
Binary | Bytea | ARRAY OF BYTE |
VarBinary |
| ARRAY OF BYTE |
Notice | |
Data security In flash memory devices the number of write access operations is limited. The flash memory devices can fail, with a risk of data loss.
|
Data type support WSTRING is not supported by this database. (See WString support) |