Working with EDB Postgres databases

EDB Postgres supports several methods to connect and access your database.

To connect to your EDB Postgres instance, see Setting up access to service instances.

Working with SQL

Creating a new table

A new table is created by specifying the table name, along with all column names and their types. The following is a simplified version of the project sample table with just the minimum information needed to define a table.

app=> CREATE TABLE projects (person_id INTEGER, project_name VARCHAR(20));

CREATE TABLE
Inserting rows into a table
app=> INSERT INTO projects VALUES (1, 'Teach');

INSERT 0 1

app=> INSERT INTO projects VALUES (1, 'Code');

INSERT 0 1

app=> INSERT INTO projects VALUES (2, 'Code');

INSERT 0 1
Retrieve rows from a table or view
app=> select * from projects;

 person_id | project_name 

-----------+--------------

         1 | Teach

         1 | Code

         2 | Code

(3 rows)

Deleting EDB Postgres instances

A user with the manage service instances permission can delete a service instance.

To delete a database:
  1. From the Cloud Pak for Data navigation menu, select Services > Instances.
  2. Filter the list by type.
  3. Delete the instance.