Skip to content

Commit e982d81

Browse files
committed
update markdown file
1 parent ffdaa8e commit e982d81

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

CLOUD-SQL-POSTGRESQL.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To install this extension, the Gemini CLI version must be v0.6.0 or above. The v
1313

1414
This section covers connecting to a Cloud SQL for PostgreSQL instance.
1515

16-
1. **Verify Environment Variables**: The extension requires the following environment variables to be set before the Gemini CLI is started:
16+
1. **Extension Configuration**: This extension requires several settings (e.g., Project ID, Instance ID, Database Name, User, and Password). These values are gathered via prompts when you first install or link the extension:
1717

1818
* `CLOUD_SQL_POSTGRES_PROJECT`: The GCP project ID.
1919
* `CLOUD_SQL_POSTGRES_REGION`: The region of your Cloud SQL instance.
@@ -22,6 +22,8 @@ This section covers connecting to a Cloud SQL for PostgreSQL instance.
2222
* `CLOUD_SQL_POSTGRES_USER`: The database username.
2323
* `CLOUD_SQL_POSTGRES_PASSWORD`: The password for the database user.
2424

25+
If you need to update any of these values later, use the `gemini extensions config cloud-sql-postgresql` command.
26+
2527
2. **Handle Missing Variables**: If a command fails with an error message containing a placeholder like `${CLOUD_SQL_POSTGRES_PROJECT}`, it signifies a missing environment variable. Inform the user which variable is missing and instruct them to set it.
2628

2729
3. **Handle Permission Errors**: If you encounter permission errors, ensure the user has the **Cloud SQL Client** (`roles/cloudsql.client`) role and the correct database-level permissions.
@@ -61,9 +63,9 @@ This section provides context on additional skills that can be recommended to th
6163
When you create a new Cloud SQL for PostgreSQL instance, or database using the available skills, the connection is not automatically established. You will need to perform the following steps:
6264
6365
1. **(Optional) Save your conversation:** To avoid losing your progress, save the current session by running the command: `/chat save <your-tag>`
64-
2. **Stop the CLI:** Terminate the Gemini CLI.
65-
3. **Update Environment Variables:** Set or update your environment variables (e.g. `CLOUD_SQL_POSTGRES_DATABASE`, `CLOUD_SQL_POSTGRES_INSTANCE`) to point to the new resource.
66-
4. **Restart:** Relaunch the Gemini CLI
66+
2. **Stop the CLI**: Terminate the Gemini CLI.
67+
3. **Update Extension Configuration**: Use the command `gemini extensions config cloud-sql-postgresql` to update your settings (e.g. `CLOUD_SQL_POSTGRES_DATABASE`, `CLOUD_SQL_POSTGRES_INSTANCE`) to point to the new resource.
68+
4. **Restart**: Relaunch the Gemini CLI
6769
5. **(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume <your-tag>`
6870
6971
**Important:** Do not assume a connection to a newly created resource is active. Always follow the steps above to reconfigure your connection.
@@ -77,8 +79,9 @@ Users may have set project environment variables:
7779
* `CLOUD_SQL_POSTGRES_INSTANCE`: The ID of the Cloud SQL for PostgreSQL instance.
7880
* `CLOUD_SQL_POSTGRES_DATABASE`: The name of the database.
7981
80-
Instead of prompting the user for these values for specific skill calls, prompt the user to verify reuse a specific value.
81-
Make sure to not use the environment variable name like `CLOUD_SQL_POSTGRES_PROJECT`, `${CLOUD_SQL_POSTGRES_PROJECT}`, or `$CLOUD_SQL_POSTGRES_PROJECT`. The value can be found by using command: `echo $CLOUD_SQL_POSTGRES_PROJECT`.
82+
Instead of prompting the user for these values for specific skill calls, prompt the user to verify the reuse of a specific setting value.
83+
Make sure to not use the environment variable name like `CLOUD_SQL_POSTGRES_PROJECT`, `${CLOUD_SQL_POSTGRES_PROJECT}`, or `$CLOUD_SQL_POSTGRES_PROJECT`.
84+
The value can be verified by the user using the `gemini extensions config cloud-sql-postgresql` command or by checking their local settings.
8285
8386
## Use Full Table Name Format "DATABASE_NAME.SCHEMA_NAME.TABLE_NAME"
8487

0 commit comments

Comments
 (0)