fix(sql-tools): force ISO DateStyle on postgres connections (#719)

This commit is contained in:
Santo Shakil
2026-08-19 16:59:13 -04:00
committed by GitHub
parent 87cba589c8
commit b91935ed1c
2 changed files with 3 additions and 0 deletions
@@ -38,6 +38,7 @@ export const createPostgres = (options: DatabasePostgresOptions = {}) => {
connection = { connectionType: 'url', url: 'postgres://postgres:postgres@localhost:5432/postgres' },
maxConnections = 10,
timeZone = 'UTC',
dateStyle = 'ISO',
convertToJsDate = true,
convertBigIntToNumber = true,
onNotice,
@@ -76,6 +77,7 @@ export const createPostgres = (options: DatabasePostgresOptions = {}) => {
max: maxConnections,
connection: {
TimeZone: timeZone,
DateStyle: dateStyle,
},
types,
onnotice: onNotice,
+1
View File
@@ -10,6 +10,7 @@ export type DatabasePostgresOptions = {
connection?: DatabaseConnectionParams;
maxConnections?: number;
timeZone?: string;
dateStyle?: string;
convertToJsDate?: boolean;
convertBigIntToNumber?: boolean;
onNotice?: (notice: Notice) => void;