--- title: danog\MadelineProto\Settings\Database\Postgres: Postgres backend settings. description: --- # `danog\MadelineProto\Settings\Database\Postgres` [Back to index](../../../../index.md) > Author: Daniil Gentili Postgres backend settings. ## Method list: * `getMaxConnections(): int` * `setMaxConnections(int $maxConnections): self` * `getIdleTimeout(): int` * `setIdleTimeout(int $idleTimeout): self` * `getDatabase(): string` * `setDatabase(string $database): self` * `getUsername(): string` * `setUsername(string $username): self` * `getUri(): string` * `setUri(string $uri): self` * `getKey(): string` * `getCacheTtl(): int` * `setCacheTtl(int|string $cacheTtl): self` * `getPassword(): string` * `setPassword(string $password): self` * `hasChanged(): bool` ## Methods: ### `getMaxConnections(): int` Get maximum connection limit. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `setMaxConnections(int $maxConnections): self` Set maximum connection limit. Parameters: * `$maxConnections`: `int` Maximum connection limit. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `getIdleTimeout(): int` Get idle timeout. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `setIdleTimeout(int $idleTimeout): self` Set idle timeout. Parameters: * `$idleTimeout`: `int` Idle timeout. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `getDatabase(): string` Get database name. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `setDatabase(string $database): self` Set database name. Parameters: * `$database`: `string` Database name. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `getUsername(): string` Get username. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `setUsername(string $username): self` Set username. Parameters: * `$username`: `string` Username. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `getUri(): string` Get database URI. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `setUri(string $uri): self` Set database URI. Parameters: * `$uri`: `string` Database URI. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `getKey(): string` Get DB key. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `getCacheTtl(): int` Get for how long to keep records in memory after last read, for cached backends. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `setCacheTtl(int|string $cacheTtl): self` Set for how long to keep records in memory after last read, for cached backends. The cache TTL identifier can be a string like '+5 minutes'. Parameters: * `$cacheTtl`: `int|string` For how long to keep records in memory after last read, for cached backends. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `getPassword(): string` Get password. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `setPassword(string $password): self` Set password. Parameters: * `$password`: `string` Password. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `hasChanged(): bool` Get whether this setting was changed, also applies changes. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) --- Generated by [danog/phpdoc](https://phpdoc.daniil.it)