1
0
mirror of https://github.com/tensorchord/pgvecto.rs.git synced 2025-09-15 08:41:07 +03:00
Files
pgvecto.rs/tests/transaction/test.sh
Usamoi 727d69feab feat: transactional CREATE/DROP (#279)
* feat: transactional CREATE/DROP

Signed-off-by: usamoi <usamoi@outlook.com>

* test: transaction ddl

Signed-off-by: usamoi <usamoi@outlook.com>

---------

Signed-off-by: usamoi <usamoi@outlook.com>
2024-01-17 11:47:02 +00:00

24 lines
386 B
Bash
Executable File

#!/usr/bin/env bash
set -e
d=$(psql -U postgres -tAqX -c "SELECT CURRENT_SETTING('data_directory')")/pg_vectors/indexes
a=$(sudo ls -l $d | wc -l)
printf "entries = $a\n"
psql -f $(dirname $0)/test.sql
sleep 1
b=$(sudo ls -l $d | wc -l)
printf "entries = $b\n"
if [ "$a" == "$b" ]; then
echo "Transaction test [OK]"
else
echo "Transaction test [FAILED]"
exit 1
fi