feat(pgsql): implement application_name handling in connection

This commit is contained in:
2026-04-26 17:45:25 +02:00
parent ed7130bba8
commit 837160b77a
4 changed files with 93 additions and 11 deletions

View File

@@ -5,11 +5,10 @@ import (
"fmt"
"strings"
"github.com/jackc/pgx/v5"
"git.warky.dev/wdevs/relspecgo/pkg/models"
"git.warky.dev/wdevs/relspecgo/pkg/pgsql"
"git.warky.dev/wdevs/relspecgo/pkg/readers"
"github.com/jackc/pgx/v5"
)
// Reader implements the readers.Reader interface for PostgreSQL databases
@@ -244,7 +243,7 @@ func (r *Reader) ReadTable() (*models.Table, error) {
// connect establishes a connection to the PostgreSQL database
func (r *Reader) connect() error {
conn, err := pgx.Connect(r.ctx, r.options.ConnectionString)
conn, err := pgsql.Connect(r.ctx, r.options.ConnectionString, "reader-pgsql")
if err != nil {
return err
}