PostgreSQL
IBM Cloud Databases for PostgreSQL is an open source object-relational database that is highly customizable. It’s a feature-rich enterprise database with JSON support.
Configure the following details for PostgreSQL data source:
Field | Description |
---|---|
Display name | Enter the database name to be displayed on the screen. |
Database name | Enter the name of your database. |
Hostname | Enter the hostname. |
Port | Enter the port number. |
Username | Enter the username. |
Password | Enter the password. |
Port is SSL enabled | Use the toggle switch to enable or disable SSL connection. If enabled, i. The Upload SSL certificate (.pem, .crt, .cert or .cer) link is enabled. ii. Click the Upload SSL certificate (.pem, .crt, .cert or .cer) link. iii. Browse the SSL certificate and upload. |
Validate certificate | The toggle switch must be enabled to Validate certificate. If disabled, the test connection feature does not work and the PostgreSQL database cannot be added to the engine. |
Test connection | Click the Test connection link to test the database connection. If the database connection is successful, a success message appears. |
Catalog name | Enter the name of the catalog. This catalog is automatically associated with your database. |
Create | Click Create to create the database. |
Enable the toggle switch for Validate certificate option to create the PostgreSQL database. If disabled, the Test connection feature does not work and the database cannot be added to the engine.
Limitations for SQL statements
DROP TABLE
statement is supported only when enabled in the catalog.- For database-based catalogs the
CREATE SCHEMA
,CREATE TABLE
,DROP SCHEMA
,DROP TABLE
,DELETE
,DROP VIEW
,ALTER TABLE
, andALTER SCHEMA
statements are not available in the Data Manager UI.
Limitations for data types
BLOB
andCLOB
data types can be used as an equivalent alternative toBYTEA
andTEXT
respectively.BLOB
andCLOB
data types supportSELECT
statement but do not support operations such asequal
,like
, andin
.- The data that is shown from the UI for
BLOB
data type is in Base64 format, while the result from presto-cli is in hexadecimal format. BINARY
data type supports onlySELECT
statement.BYTEA
is theBINARY
alternative data type.- When the fields of data type
REAL
have 6 digits or more in the decimal part with the digits being predominately zero, the values when queried are rounded off. It is observed that the rounding off occurs differently based on the precision of the values. For example, a decimal number 1.654 when rounded to 3-digits after the decimal point are the same. Another example is 10.890009 and 10.89000. It is noticed that 10.89000 is rounded to 10.89, whereas 10.89009 is not rounded off. This is an inherent issue because of the representational limitations of binary floating point formats. This might have a significant impact when querying involves sorting.