# Postgres Configuration

Once PostgreSQL is installed, you need to create a user, database, and assign permissions.

### 1. Create User

Replace `your_password` with a secure password.

```sql
CREATE USER "bindplane" WITH PASSWORD 'your_password';
```

### 2. Create Database

Create a database named `bindplane`. You can use a different database name if you prefer.

```sql
CREATE DATABASE "bindplane" ENCODING 'UTF8' TEMPLATE template0;
GRANT CREATE ON DATABASE "bindplane" TO "bindplane";
\c "bindplane";
```

### 3. Grant Permissions

Switch to the database created in step 1 with `\c bindplane`. Replace `bindplane` with the name of your database. Once connected, execute the following `GRANT` commands to give the `bindplane` user access to the `bindplane` database. Update the schema and database name if you used a different name.

```sql
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "bindplane";
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO "bindplane";
GRANT ALL PRIVILEGES ON SCHEMA public TO "bindplane";
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/deployment/virtual-machine/bindplane/postgresql/postgres-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
