Skip to content

Consistent handling of disabled features #37

@Cito

Description

@Cito

PyGreSQL has some preprocessor macros such as SSL_INFO that control which features are enabled. Some features may be disabled when they are not supported by the installed PostgreSQL version.

The behavior for features that are not enabled should be consistent: Either these methods/attributes should simply not be provided (using them will raise AttributeErrors) or they should be always available, but using them should raise NotSupportedError.

Currently the behavior is mostly the former, but not very consistent. The latter has the advantage that the behavior will be the same when an old version of libpq is installed and used at runtime, and applications need only one type of check to safeguard against old libpq versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions