Postgres module

parse_url

procedure · 1 overloadsince 0.27.0Source

postgres://user:password@host:port/database?sslmode=verify-full&application_name=api. postgresql:// works too. A Unix socket directory goes in host, percent-encoded or as a parameter: postgres:///app?host=/var/run/postgresql. It is parse_conninfo for a URI.

parse_url :: (url: string) -> (Config, Pg_Error)

postgres://user:password@host:port/database?sslmode=verify-full&application_name=api. postgresql:// works too. A Unix socket directory goes in host, percent-encoded or as a parameter: postgres:///app?host=/var/run/postgresql. It is parse_conninfo for a URI.

Parameters

url: string
a postgres:// or postgresql:// URL.

Returns

See also