package pqutil

import "github.com/lib/pq/internal/pqutil"

Index

Variables

var (
	ErrSSLKeyUnknownOwnership    = errors.New("unused")
	ErrSSLKeyHasWorldPermissions = errors.New("unused")
)

Functions

func Home

func Home() string

Home gets the user's home directory. Matches pqGetHomeDirectory() from PostgreSQL

https://github.com/postgres/postgres/blob/2b117bb/src/interfaces/libpq/fe-connect.c#L8214

func Join

func Join[S ~[]E, E ~string](s S) string

func ParseBool

func ParseBool(str string) (bool, error)

ParseBool is like strconv.ParseBool, but also accepts "yes"/"no" and "on"/"off".

func Pgpass

func Pgpass(passfile string) string

Pgpass gets the filepath to the pgpass file to use, returning "" if a pgpass file shouldn't be used.

func SSLKeyPermissions

func SSLKeyPermissions(sslkey string) error

func User

func User() (string, error)

Source Files

path.go perm_unsupported.go pqutil.go user_windows.go

Version
v1.11.2
Published
Feb 10, 2026
Platform
windows/amd64
Imports
9 packages
Last checked
16 minutes ago

Tools for package owners.