agora inbox for [email protected]  
help / color / mirror / Atom feed
cache lookup failed error for partition key with custom opclass
1040+ messages / 3 participants
[nested] [flat]

* cache lookup failed error for partition key with custom opclass
@ 2017-07-24 11:36  Rushabh Lathia <[email protected]>
  0 siblings, 1 reply; 1040+ messages in thread

From: Rushabh Lathia @ 2017-07-24 11:36 UTC (permalink / raw)
  To: pgsql-hackers

Hi,

Consider the following test:

CREATE OR REPLACE FUNCTION dummy_binaryint4(a int4, b int4) RETURNS int4 AS
$$ BEGIN RETURN a; END; $$ LANGUAGE 'plpgsql' IMMUTABLE;

CREATE OPERATOR CLASS custom_opclass2 FOR TYPE int2 USING BTREE AS OPERATOR
1 = , FUNCTION 1 dummy_binaryint4(int4, int4);

t=# CREATE TABLE list_tab(a int2, b int) PARTITION BY LIST (a
custom_opclass2);
*ERROR:  cache lookup failed for function 0*

In the above test creating OP class type int2, but passing the function of
int4
type. During CREATE PARTITION, ComputePartitionAttrs() able to resolve the
opclass
for the partition key (partition key type is int2), but while looking for a
method for the int2 -
it unable to find the proper function and end up with the cache lookup
failed error.
Error coming from RelationBuildPartitionKey().

I think overall this is expected but still error can be better - like all
the other
places where get_opfamily_proc() unable to find valid function oid.

PFA patch, where added elog() to add the error message same as all other
places.


Thanks,
Rushabh Lathia
www.EnterpriseDB.com


-- 
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Attachments:

  [text/x-patch] cache_lookup_fail.patch (630B, ../../CAGPqQf2R9Nk8htpv0FFi+FP776EwMyGuORpc9zYkZKC8sFQE3g@mail.gmail.com/3-cache_lookup_fail.patch)
  download | inline diff:
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 43238dd..6bd93b0 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -945,6 +945,10 @@ RelationBuildPartitionKey(Relation relation)
 								   opclassform->opcintype,
 								   opclassform->opcintype,
 								   BTORDER_PROC);
+		if (!OidIsValid(funcid))	/* should not happen */
+			elog(ERROR, "missing support function %d(%u,%u) in opfamily %u",
+				 BTORDER_PROC, opclassform->opcintype, opclassform->opcintype,
+				 opclassform->opcfamily);
 
 		fmgr_info(funcid, &key->partsupfunc[i]);
 


^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* Re: cache lookup failed error for partition key with custom opclass
@ 2017-07-24 13:53  Tom Lane <[email protected]>
  parent: Rushabh Lathia <[email protected]>
  0 siblings, 1 reply; 1040+ messages in thread

From: Tom Lane @ 2017-07-24 13:53 UTC (permalink / raw)
  To: Rushabh Lathia <[email protected]>; +Cc: pgsql-hackers

Rushabh Lathia <[email protected]> writes:
> PFA patch, where added elog() to add the error message same as all other
> places.

Some looking around says that this *isn't* the only place that just
blithely assumes that it will find an opfamily entry.  But I agree
that not checking for that isn't up to project standards.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* Re: cache lookup failed error for partition key with custom opclass
@ 2017-07-25 05:41  Rushabh Lathia <[email protected]>
  parent: Tom Lane <[email protected]>
  0 siblings, 1 reply; 1040+ messages in thread

From: Rushabh Lathia @ 2017-07-25 05:41 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: pgsql-hackers

On Mon, Jul 24, 2017 at 7:23 PM, Tom Lane <[email protected]> wrote:

> Rushabh Lathia <[email protected]> writes:
> > PFA patch, where added elog() to add the error message same as all other
> > places.
>
> Some looking around says that this *isn't* the only place that just
> blithely assumes that it will find an opfamily entry.  But I agree
> that not checking for that isn't up to project standards.
>

Thanks Tom.

I go thorough the get_opfamily_proc() in the system and added the
check for InvalidOid.

Thanks,
Rushabh Lathia
www.EnterpriseDB.com


-- 
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Attachments:

  [text/x-patch] cache_lookup_fail_v2.patch (2.5K, ../../CAGPqQf0=p9D4oPS2uhqztn00ZBgpCdLrN_AXwO0AwnN6-n7RbQ@mail.gmail.com/3-cache_lookup_fail_v2.patch)
  download | inline diff:
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index 5267a01..c9c1a54 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -1640,6 +1640,9 @@ ExecInitExprRec(Expr *node, PlanState *parent, ExprState *state,
 											 lefttype,
 											 righttype,
 											 BTORDER_PROC);
+					if (!OidIsValid(proc))    /* should not happen */
+						elog(ERROR, "missing support function %d(%u,%u) in opfamily %u",
+							 BTORDER_PROC, lefttype, righttype, opfamily);
 
 					/* Set up the primary fmgr lookup information */
 					finfo = palloc0(sizeof(FmgrInfo));
diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c
index d8aceb1..ff758d6 100644
--- a/src/backend/executor/nodeIndexscan.c
+++ b/src/backend/executor/nodeIndexscan.c
@@ -1367,6 +1367,9 @@ ExecIndexBuildScanKeys(PlanState *planstate, Relation index,
 											 op_lefttype,
 											 op_righttype,
 											 BTORDER_PROC);
+				if (!OidIsValid(opfuncid))    /* should not happen */
+					elog(ERROR, "missing support function %d(%u,%u) in opfamily %u",
+						 BTORDER_PROC, op_lefttype, op_righttype, opfamily);
 
 				inputcollation = lfirst_oid(collids_cell);
 				collids_cell = lnext(collids_cell);
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 43238dd..6bd93b0 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -945,6 +945,10 @@ RelationBuildPartitionKey(Relation relation)
 								   opclassform->opcintype,
 								   opclassform->opcintype,
 								   BTORDER_PROC);
+		if (!OidIsValid(funcid))	/* should not happen */
+			elog(ERROR, "missing support function %d(%u,%u) in opfamily %u",
+				 BTORDER_PROC, opclassform->opcintype, opclassform->opcintype,
+				 opclassform->opcfamily);
 
 		fmgr_info(funcid, &key->partsupfunc[i]);
 
diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c
index 7ec31eb..bc2f164 100644
--- a/src/backend/utils/cache/typcache.c
+++ b/src/backend/utils/cache/typcache.c
@@ -440,6 +440,10 @@ lookup_type_cache(Oid type_id, int flags)
 										 typentry->btree_opintype,
 										 typentry->btree_opintype,
 										 BTORDER_PROC);
+		if (!OidIsValid(cmp_proc))    /* should not happen */
+			elog(ERROR, "missing support function %d(%u,%u) in opfamily %u",
+				 BTORDER_PROC, typentry->btree_opintype,
+				 typentry->btree_opintype, typentry->btree_opf);
 
 		/* As above, make sure array_cmp or record_cmp will succeed */
 		if (cmp_proc == F_BTARRAYCMP &&


^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* Re: cache lookup failed error for partition key with custom opclass
@ 2017-07-25 14:13  Tom Lane <[email protected]>
  parent: Rushabh Lathia <[email protected]>
  0 siblings, 1 reply; 1040+ messages in thread

From: Tom Lane @ 2017-07-25 14:13 UTC (permalink / raw)
  To: Rushabh Lathia <[email protected]>; +Cc: pgsql-hackers

Rushabh Lathia <[email protected]> writes:
> On Mon, Jul 24, 2017 at 7:23 PM, Tom Lane <[email protected]> wrote:
>> Some looking around says that this *isn't* the only place that just
>> blithely assumes that it will find an opfamily entry.  But I agree
>> that not checking for that isn't up to project standards.

> I go thorough the get_opfamily_proc() in the system and added the
> check for InvalidOid.

Think I did that already, please compare your results with
278cb4341103e967189997985b09981a73e23a34

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* Re: cache lookup failed error for partition key with custom opclass
@ 2017-07-26 06:31  Rushabh Lathia <[email protected]>
  parent: Tom Lane <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Rushabh Lathia @ 2017-07-26 06:31 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: pgsql-hackers

On Tue, Jul 25, 2017 at 7:43 PM, Tom Lane <[email protected]> wrote:

> Rushabh Lathia <[email protected]> writes:
> > On Mon, Jul 24, 2017 at 7:23 PM, Tom Lane <[email protected]> wrote:
> >> Some looking around says that this *isn't* the only place that just
> >> blithely assumes that it will find an opfamily entry.  But I agree
> >> that not checking for that isn't up to project standards.
>
> > I go thorough the get_opfamily_proc() in the system and added the
> > check for InvalidOid.
>
> Think I did that already, please compare your results with
> 278cb4341103e967189997985b09981a73e23a34
>

Thanks Tom.


>
>                         regards, tom lane
>



-- 
Rushabh Lathia


^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--






^ permalink  raw  reply  [nested|flat] 1040+ messages in thread

* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05  Nathan Bossart <[email protected]>
  0 siblings, 0 replies; 1040+ messages in thread

From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)

---
 contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
 	 * delete...
 	 */
 	buf[0] = '\0';
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "WITH RECURSIVE cte AS "
+			   "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+			   "UNION ALL "
+			   "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+			   "JOIN cte t2 ON t.oid = t2.typbasetype) ");
 	strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
 	strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, ", cte ");
 	strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
 	strcat(buf, "      AND a.attrelid = c.oid ");
 	strcat(buf, "      AND a.atttypid = t.oid ");
 	strcat(buf, "      AND c.relnamespace = s.oid ");
-	strcat(buf, "      AND t.typname in ('oid', 'lo') ");
+	if (PQserverVersion(conn) >= 140000)
+		strcat(buf, "  AND t.oid = cte.oid2 "
+			   "       AND cte.typname = 'oid' ");
+	else
+		strcat(buf, "  AND t.typname in ('oid', 'lo') ");
 	strcat(buf, "      AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
 	strcat(buf, "      AND s.nspname !~ '^pg_'");
 	res = PQexec(conn, buf);
-- 
2.50.1 (Apple Git-155)


--K++Jp4URl2Oj0VAw--





^ permalink  raw  reply  [nested|flat] 1040+ messages in thread


end of thread, other threads:[~2026-05-14 03:05 UTC | newest]

Thread overview: 1040+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-07-24 11:36 cache lookup failed error for partition key with custom opclass Rushabh Lathia <[email protected]>
2017-07-24 13:53 ` Tom Lane <[email protected]>
2017-07-25 05:41   ` Rushabh Lathia <[email protected]>
2017-07-25 14:13     ` Tom Lane <[email protected]>
2017-07-26 06:31       ` Rushabh Lathia <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox