./Sources/DbExtra-postgresql.php
- db_extra_init
- smf_db_backup_table
- smf_db_optimize_table
- smf_db_list_tables
- smf_db_table_sql
- smf_db_get_version
- smf_db_get_vendor
- smf_db_allow_persistent
db_extra_init
function db_extra_init(): void
Add the functions implemented in this file to the $smcFunc array.
smf_db_backup_table
function smf_db_backup_table(string $table, string $backup_table): resource
Backup $table to $backup_table.
Type | Parameter | Description |
---|---|---|
string |
$table |
The name of the table to backup |
string |
$backup_table |
The name of the backup table for this table |
smf_db_optimize_table
function smf_db_optimize_table(string $table): int
This function optimizes a table.
Type | Parameter | Description |
---|---|---|
string |
$table |
The table to be optimized |
smf_db_list_tables
function smf_db_list_tables(string|bool $db = false, string|bool $filter = false): array
This function lists all tables in the database.
The listing could be filtered according to $filter.
Type | Parameter | Description |
---|---|---|
string |bool |
$db |
string The database name or false to use the current DB |
string |bool |
$filter |
String to filter by or false to list all tables |
smf_db_table_sql
function smf_db_table_sql(string $tableName): string
Dumps the schema (CREATE) for a table.
Type | Parameter | Description |
---|---|---|
string |
$tableName |
The name of the table |
smf_db_get_version
function smf_db_get_version(): string
Get the version number.
smf_db_get_vendor
function smf_db_get_vendor(): string
Return PostgreSQL
smf_db_allow_persistent
function smf_db_allow_persistent(): bool
Figures out if persistent connection is allowed