You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLOUD-SQL-POSTGRESQL.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ To install this extension, the Gemini CLI version must be v0.6.0 or above. The v
13
13
14
14
This section covers connecting to a Cloud SQL for PostgreSQL instance.
15
15
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:
17
17
18
18
*`CLOUD_SQL_POSTGRES_PROJECT`: The GCP project ID.
19
19
*`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.
22
22
*`CLOUD_SQL_POSTGRES_USER`: The database username.
23
23
*`CLOUD_SQL_POSTGRES_PASSWORD`: The password for the database user.
24
24
25
+
If you need to update any of these values later, use the `gemini extensions config cloud-sql-postgresql` command.
26
+
25
27
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.
26
28
27
29
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
61
63
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:
62
64
63
65
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
67
69
5. **(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume <your-tag>`
68
70
69
71
**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:
77
79
* `CLOUD_SQL_POSTGRES_INSTANCE`: The ID of the Cloud SQL for PostgreSQL instance.
78
80
* `CLOUD_SQL_POSTGRES_DATABASE`: The name of the database.
79
81
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.
82
85
83
86
## Use Full Table Name Format "DATABASE_NAME.SCHEMA_NAME.TABLE_NAME"
0 commit comments