Revision 8f07fac1
Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt
SL/DBUtils.pm | ||
---|---|---|
13 | 13 |
selectall_ids |
14 | 14 |
prepare_execute_query prepare_query |
15 | 15 |
create_sort_spec does_table_exist |
16 |
add_token); |
|
16 |
add_token check_trgm);
|
|
17 | 17 |
|
18 | 18 |
use strict; |
19 | 19 |
|
... | ... | |
398 | 398 |
return $is_superuser; |
399 | 399 |
} |
400 | 400 |
|
401 |
sub check_trgm { |
|
402 |
my ($dbh) = @_; |
|
403 |
|
|
404 |
my $version = $dbh->selectrow_array(qq|SELECT installed_version FROM pg_available_extensions WHERE name = 'pg_trgm'|); |
|
405 |
|
|
406 |
return !!$version; |
|
407 |
} |
|
408 |
|
|
401 | 409 |
1; |
402 | 410 |
|
403 | 411 |
|
... | ... | |
684 | 692 |
report). If it is undefined then the 'default_dir' parameter will be |
685 | 693 |
used instead. |
686 | 694 |
|
695 |
=item check_trgm |
|
696 |
|
|
697 |
Checks if the postgresextension pg_trgm is installed and return trueish |
|
698 |
or falsish. |
|
699 |
|
|
687 | 700 |
=back |
688 | 701 |
|
689 | 702 |
=head1 DEBUG FUNCTIONS |
Auch abrufbar als: Unified diff
DBUtils: Prüfung auf Trigram-Erweiterung aus S/D/ShopOrder in DBUtils verschoben