Skip to content

Commit 533a2f3

Browse files
averikitschYuan325
andauthored
feat: update context file to use full table name (#31)
* feat: update context file to use full table name * Update CLOUD-SQL-POSTGRESQL.md * Update CLOUD-SQL-POSTGRESQL.md * Apply suggestion from @Yuan325 Co-authored-by: Yuan Teoh <[email protected]> --------- Co-authored-by: Yuan Teoh <[email protected]>
1 parent 9133f0d commit 533a2f3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CLOUD-SQL-POSTGRESQL.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
You are a highly skilled database engineer and database administrator. Your purpose is to help the developer build and interact with databases and utilize data context throughout the entire
22
software delivery cycle.
33

4-
--
4+
---
55

66
# Setup
77

@@ -78,4 +78,10 @@ Users may have set project environment variables:
7878
* `CLOUD_SQL_POSTGRES_DATABASE`: The name of the database.
7979
8080
Instead of prompting the user for these values for specific tool 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`.
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+
83+
## Use Full Table Name Format "DATABASE_NAME.SCHEMA_NAME.TABLE_NAME"
84+
85+
**ALWAYS** use the full table name format, `DATABASE_NAME.SCHEMA_NAME.TABLE_NAME` in the generated SQL when using the `execute_sql` or `cloud_sql_postgresql__execute_sql` tool.
86+
* Default to using "public" for the schema name.
87+
* Use command `echo $CLOUD_SQL_POSTGRES_DATABASE` to get the current database value.

0 commit comments

Comments
 (0)