mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-07 13:32:57 +00:00
## Problem Some extensions do not contain tests, which can be easily run on top of docker-compose or staging. ## Summary of changes Added the pg_regress based tests for `pg_tiktoken`, `pgx_ulid`, `pg_rag` Now they will be run on top of docker-compose, but I intend to adopt them to be run on top staging in the next PRs
20 lines
782 B
Plaintext
20 lines
782 B
Plaintext
-- Test ULID error handling
|
|
-- Test invalid ULID string (too short)
|
|
SELECT '01GV5PA9EQG7D82Q3Y4PKBZSY'::ulid;
|
|
ERROR: invalid input syntax for type ulid: "01GV5PA9EQG7D82Q3Y4PKBZSY": invalid length
|
|
LINE 1: SELECT '01GV5PA9EQG7D82Q3Y4PKBZSY'::ulid;
|
|
^
|
|
-- Test invalid ULID string (invalid character)
|
|
SELECT '01GV5PA9EQG7D82Q3Y4PKBZSYU'::ulid;
|
|
ERROR: invalid input syntax for type ulid: "01GV5PA9EQG7D82Q3Y4PKBZSYU": invalid character
|
|
LINE 1: SELECT '01GV5PA9EQG7D82Q3Y4PKBZSYU'::ulid;
|
|
^
|
|
-- Test NULL handling
|
|
SELECT 'NULL to ulid conversion returns NULL' as test_name,
|
|
NULL::ulid IS NULL as result;
|
|
test_name | result
|
|
--------------------------------------+--------
|
|
NULL to ulid conversion returns NULL | t
|
|
(1 row)
|
|
|