> On Nov 12, 2025, at 00:14, Florin Irion <[email protected]> wrote:
>
> Hello, Cirrus-CI was complaining because we don't sort the constraints and
> thus
> they were making the test fail because of the random order.
> Made it sort with `list_sort`and `list_oid_cmp`not sure if that's the best
> thing to sort them.
> Check v4 attached.
> Cheers,
> Florin Irion
> Tim Waizenegger
> EDB (EnterpriseDB)
> <v4-0001-Add-pg_get_domain_ddl-function-to-reconstruct-CRE.patch>
I just tested v4, and see two problems:
```
evantest=# CREATE DOMAIN public.int AS pg_catalog.int4;
CREATE DOMAIN
evantest=# SELECT pg_get_domain_ddl('int');
ERROR: cache lookup failed for type 0
evantest=#
evantest=#
evantest=# SELECT pg_get_domain_ddl('pg_class');
ERROR: cache lookup failed for type 0
evantest=#
evantest=#
evantest=# SELECT pg_get_domain_ddl('public.int');
pg_get_domain_ddl
------------------------------------------------
CREATE DOMAIN public."int" AS pg_catalog.int4;
(1 row)
evantest=# show search_path;
search_path
-----------------
"$user", public
(1 row)
```
1. The error message "cache lookup failed for type 0” looks not good. At lease
saying something like “domain ‘int’ does not exist”.
2. I created a domain “int” in “public”, as you see, “public” is in the
search_path, but SELECT pg_get_domain_ddl('int’); failed.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/