Skip to content

Commit c3431f6

Browse files
committed
Update PostgreSQL server and test files
- Updated postgres_server.py with latest functionality - Updated test_server.py with corresponding test cases - Ensuring compatibility with all 237 PostgreSQL tools
1 parent 641a157 commit c3431f6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

postgres_server.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
import logging
66
from typing import Any, Dict, List, Optional
77
import asyncpg
8-
from asyncpg import Record
98
from mcp.server.fastmcp import FastMCP, Context
10-
from mcp.server.fastmcp.resources import base
119
from pydantic import BaseModel, Field
1210

1311
# Set up logging

test_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from postgres_server import (
1111
PostgreSQL_list_tables,
1212
PostgreSQL_describe_table,
13-
PostgreSQL_execute_query,
13+
execute_query,
1414
TableInfo,
1515
ColumnInfo
1616
)
@@ -31,7 +31,7 @@ async def test_connection():
3131
async def test_list_tables():
3232
"""Test listing tables in public schema"""
3333
try:
34-
tables = await list_tables("public")
34+
tables = await PostgreSQL_list_tables("public")
3535
print(f"✅ Found {len(tables)} tables in 'public' schema")
3636
for table in tables[:5]: # Show first 5 tables
3737
print(f" - {table.table_name} ({table.table_type})")

0 commit comments

Comments
 (0)