diff mbox series

[meta-oe,3/3] ptest-pgxs.bbclass: create the test database as UTF8

Message ID 20261204015823.7-4-bbnpreetsingh@gmail.com
State New
Headers show
Series ptest-pgxs.bbclass: three fixes from porting more extensions | expand

Commit Message

Babanpreet Singh Dec. 4, 2026, 1:58 a.m. UTC
The test server is initialised under the C locale of the target, which
makes the database SQL_ASCII, and tests with non-ASCII text fail with
"conversion between UTF8 and SQL_ASCII is not supported".

AI-Generated: Uses Claude (claude-opus-5-5)
Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com>
---
 meta-oe/classes/ptest-pgxs.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/classes/ptest-pgxs.bbclass b/meta-oe/classes/ptest-pgxs.bbclass
index 89f482ba53..4c18ea84f5 100644
--- a/meta-oe/classes/ptest-pgxs.bbclass
+++ b/meta-oe/classes/ptest-pgxs.bbclass
@@ -91,7 +91,7 @@  chown -R postgres:postgres "$WORK"
 LOG="$WORK/pg_regress.log"
 { su postgres -c "cd $WORK && $PG_REGRESS \
       --temp-instance=$WORK/tmp_check --temp-config=$WORK/ptest.conf \
-      --bindir=$PGBIN --dbname=contrib_regression \
+      --bindir=$PGBIN --dbname=contrib_regression --encoding=UTF8 \
       $REGRESS_OPTS $REGRESS" 2>&1; echo $? > "$WORK/rc"; } |
     tee "$LOG" |
     sed -n -e 's/^ok [0-9]* *[-+] *\([^ ]*\).*/PASS: \1/p' \