parse_postgres_url

Function parse_postgres_url 

Source
pub fn parse_postgres_url(url: &str) -> Result<PostgresUrlParts>
Expand description

Parse a PostgreSQL URL into its components

§Arguments

  • url - PostgreSQL connection URL (postgres:// or postgresql://)

§Returns

Returns a PostgresUrlParts struct with normalized components.

§Security

This function extracts passwords from URLs for use with .pgpass files. Ensure returned values are handled securely and not logged.