mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-16 09:30:59 +08:00
Use consistent style in TAP tests [skip ci]
This commit is contained in:
@@ -52,7 +52,8 @@ $node->safe_psql("postgres", "CREATE EXTENSION vector;");
|
||||
$node->safe_psql("postgres", "CREATE TABLE tst (i serial, v vector(3));");
|
||||
|
||||
# Generate queries
|
||||
for (1..20) {
|
||||
for (1 .. 20)
|
||||
{
|
||||
my $r1 = rand();
|
||||
my $r2 = rand();
|
||||
my $r3 = rand();
|
||||
@@ -62,7 +63,8 @@ for (1..20) {
|
||||
# Check each index type
|
||||
my @operators = ("<->", "<#>", "<=>");
|
||||
|
||||
foreach (@operators) {
|
||||
foreach (@operators)
|
||||
{
|
||||
my $operator = $_;
|
||||
|
||||
# Add index
|
||||
@@ -90,7 +92,8 @@ foreach (@operators) {
|
||||
|
||||
# Get exact results
|
||||
@expected = ();
|
||||
foreach (@queries) {
|
||||
foreach (@queries)
|
||||
{
|
||||
my $res = $node->safe_psql("postgres", qq(
|
||||
SET enable_indexscan = off;
|
||||
SELECT i FROM tst ORDER BY v $operator '$_' LIMIT $limit;
|
||||
|
||||
Reference in New Issue
Block a user