mcp-postgres-full-access
Version:
Full-access PostgreSQL server for Model Context Protocol with read/write capabilities and enhanced schema metadata
18 lines (17 loc) • 549 B
TypeScript
import pg from "pg";
/**
* Safely releases a client back to the pool, handling potential
* "already released" errors gracefully
*/
export declare function safelyReleaseClient(client: pg.PoolClient): void;
/**
* Determine if a query is read-only (DQL)
* @param sql The SQL query to analyze
* @returns True if the query is read-only
*/
export declare function isReadOnlyQuery(sql: string): boolean;
/**
* Generate a unique transaction ID
* @returns A unique transaction identifier
*/
export declare function generateTransactionId(): string;