Connecting to PostgreSQL
Prerequisites
- The PostgreSQL instance is accessible over the network from the PuppyGraph instance.
Configuration
Configuration |
Explanation |
Catalog name |
A customized name assigned to the PostgreSQL connection. It is used internally by PuppyGraph and will be referenced later when building the graph schema. |
Username |
The username used to connect to the PostgreSQL database. |
Password |
The password associated with the database user account. |
JDBC Connection String |
A JDBC-compliant URI used to connect to the PostgreSQL database. See the JDBC documentation for syntax and examples. |
Driver Class |
The fully qualified class name of the PostgreSQL JDBC driver. Default: org.postgresql.Driver |
Caching JDBC Metadata |
Whether to cache JDBC metadata (e.g., table schemas) to improve performance. |
JDBC Metadata Cache TTL (seconds) |
The time-to-live (TTL) for cached JDBC metadata, in seconds. After this period, the metadata will be refreshed. |
Data Type Mapping
PostgreSQL Type |
PuppyGraph Type |
Explanation |
boolean |
Boolean |
Boolean value: true or false |
smallint |
Short |
16-bit signed integer |
integer |
Int |
32-bit signed integer |
bigint |
Long |
64-bit signed integer |
real |
Float |
32-bit single-precision floating point (IEEE 754) |
double precision |
Double |
64-bit double-precision floating point (IEEE 754) |
numeric(P, S) / decimal(P, S) |
Decimal(P, S) |
Exact fixed-point number with precision P and scale S |
text / varchar |
String |
Variable-length UTF-8 encoded string |
date |
Date |
Calendar date (year, month, day), no time or timezone |
timestamp |
DateTime |
Date and time with microsecond precision, no timezone |
Tutorials
See Querying PostgreSQL Data as a Graph for a complete demo for PostgreSQL. The demo includes setting up the connection to a PostgreSQL database instance.