Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend postgres context #4210

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Jaizkibel
Copy link

Description

Adds more information to PostgreSQL Context.
Added for tables

  • Indexes
  • Foreign Keys
  • Triggers
  • Comments

Added for views

  • Select statement used to create the view

Added context for materialized views with

  • List of columns
  • Indexes
  • Sample rows
  • Comments
  • Salect statement used to create materialized view

Other changes

  • "All tables" item at top of submenue list
  • Optional "excludePattern" for postgres context config to exclude matching tables/views from context
  • No sample rows for views. Selects on views without where clause may take long time.

See attached context examples from Sakila db:
table_example.txt
view_example.txt
mat_view_example.txt

Checklist

  • The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screenshots

[ For visual changes, include screenshots. ]

Testing instructions

  1. Add a "postgres" context provider with connection properties
  2. Send a chat prompt with context @Postgres (all tables)
  3. Check if provided context contains all expected informations (see example)
  4. Add a "excludePattern" property to postgres config
  5. Send another prompt with @Postgres
  6. Check if tables/views with names matching the pattern are excluded from context

Copy link

netlify bot commented Feb 17, 2025

Deploy Preview for continuedev ready!

Name Link
🔨 Latest commit 4f47481
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/67b9f68e5ff2b200079b510d
😎 Deploy Preview https://deploy-preview-4210--continuedev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant