agora inbox for [email protected]
help / color / mirror / Atom feedcasting zero-length strings
1040+ messages / 4 participants
[nested] [flat]
* casting zero-length strings
@ 2004-02-17 03:39 Neil Conway <[email protected]>
0 siblings, 1 reply; 1040+ messages in thread
From: Neil Conway @ 2004-02-17 03:39 UTC (permalink / raw)
To: pgsql-hackers; +Cc: Christopher Kings-Lynne <[email protected]>
Chris KL recently pointed out to me that we currently don't raise an
error when attempting to cast a zero-length string to a float:
nconway=# select ''::float8;
float8
--------
0
(1 row)
nconway=# select ''::float4;
float4
--------
0
(1 row)
Similarly for oid:
nconway=# select ''::oid;
oid
-----
0
(1 row)
Whereas int and numeric reject zero-length strings:
nconway=# select ''::int;
ERROR: invalid input syntax for integer: ""
nconway=# select ''::numeric;
ERROR: invalid input syntax for type numeric: ""
So, should we fix oid and float?
I'm leaning toward "yes", for the sake of consistency and
sanity. However, we were bitten by backward-compatibility concerns
when we made a similar change to the "int" input rules during the 7.3
cycle, so I'm open to other suggestions.
-Neil
^ permalink raw reply [nested|flat] 1040+ messages in thread
* Re: casting zero-length strings
@ 2004-02-17 04:26 Tom Lane <[email protected]>
parent: Neil Conway <[email protected]>
0 siblings, 1 reply; 1040+ messages in thread
From: Tom Lane @ 2004-02-17 04:26 UTC (permalink / raw)
To: Neil Conway <[email protected]>; +Cc: pgsql-hackers; Christopher Kings-Lynne <[email protected]>
Neil Conway <[email protected]> writes:
> Chris KL recently pointed out to me that we currently don't raise an
> error when attempting to cast a zero-length string to a float:
> Whereas int and numeric reject zero-length strings:
> So, should we fix oid and float?
Yes, surely, unless someone wants to argue for reverting that change
to pg_atoi. I can't see a reason for having them act inconsistently.
While we are at it we should make sure these functions are all on the
same page about allowing leading/trailing whitespace. I seem to recall
that the spec says somewhere that both should be allowed ... but right
now I do not think we allow trailing whitespace.
regards, tom lane
^ permalink raw reply [nested|flat] 1040+ messages in thread
* Re: casting zero-length strings
@ 2004-02-17 05:03 Christopher Kings-Lynne <[email protected]>
parent: Tom Lane <[email protected]>
0 siblings, 1 reply; 1040+ messages in thread
From: Christopher Kings-Lynne @ 2004-02-17 05:03 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Neil Conway <[email protected]>; pgsql-hackers
> Yes, surely, unless someone wants to argue for reverting that change
> to pg_atoi. I can't see a reason for having them act inconsistently.
>
> While we are at it we should make sure these functions are all on the
> same page about allowing leading/trailing whitespace. I seem to recall
> that the spec says somewhere that both should be allowed ... but right
> now I do not think we allow trailing whitespace.
Either way, we should make them a WARNING for 7.5, then error in 7.6.
The pg_atoi change was a bit disastrous because of instant error I thought.
Chris
^ permalink raw reply [nested|flat] 1040+ messages in thread
* Re: casting zero-length strings
@ 2004-02-19 20:14 Neil Conway <[email protected]>
parent: Christopher Kings-Lynne <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Neil Conway @ 2004-02-19 20:14 UTC (permalink / raw)
To: Christopher Kings-Lynne <[email protected]>; +Cc: Tom Lane <[email protected]>; pgsql-hackers
Christopher Kings-Lynne <[email protected]> writes:
> Either way, we should make them a WARNING for 7.5, then error in
> 7.6.
Ok, I'll make this change soon.
If we end up marking more 7.5 changes using this mechanism
(i.e. deprecate for 7.5, disallow for 7.6), we could use an #ifdef
symbol to mark all the changes that need to be made permanent for 7.6:
#ifdef 7_5_DEPRECATED_FUNCTIONALITY
...
#endif
Cheers,
Neil
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND s.nspname !~ '^pg_'");
res = PQexec(conn, buf);
--
2.50.1 (Apple Git-155)
--K++Jp4URl2Oj0VAw--
^ permalink raw reply [nested|flat] 1040+ messages in thread
* [PATCH v1 1/1] teach vacuumlo to handle domains over oid
@ 2026-05-14 03:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 1040+ messages in thread
From: Nathan Bossart @ 2026-05-14 03:05 UTC (permalink / raw)
---
contrib/vacuumlo/vacuumlo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 8102569466b..230f6958fc1 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -191,13 +191,25 @@ vacuumlo(const char *database, const struct _param *param)
* delete...
*/
buf[0] = '\0';
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, "WITH RECURSIVE cte AS "
+ "(SELECT oid AS oid2, oid, typname, typbasetype FROM pg_type "
+ "UNION ALL "
+ "SELECT t2.oid2, t.oid, t.typname, t.typbasetype FROM pg_type t "
+ "JOIN cte t2 ON t.oid = t2.typbasetype) ");
strcat(buf, "SELECT s.nspname, c.relname, a.attname ");
strcat(buf, "FROM pg_class c, pg_attribute a, pg_namespace s, pg_type t ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, ", cte ");
strcat(buf, "WHERE a.attnum > 0 AND NOT a.attisdropped ");
strcat(buf, " AND a.attrelid = c.oid ");
strcat(buf, " AND a.atttypid = t.oid ");
strcat(buf, " AND c.relnamespace = s.oid ");
- strcat(buf, " AND t.typname in ('oid', 'lo') ");
+ if (PQserverVersion(conn) >= 140000)
+ strcat(buf, " AND t.oid = cte.oid2 "
+ " AND cte.typname = 'oid' ");
+ else
+ strcat(buf, " AND t.typname in ('oid', 'lo') ");
strcat(buf, " AND c.relkind in (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_MATVIEW) ")");
strcat(buf, " AND 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 --
2004-02-17 03:39 casting zero-length strings Neil Conway <[email protected]>
2004-02-17 04:26 ` Tom Lane <[email protected]>
2004-02-17 05:03 ` Christopher Kings-Lynne <[email protected]>
2004-02-19 20:14 ` Neil Conway <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid Nathan Bossart <[email protected]>
2026-05-14 03:05 [PATCH v1 1/1] teach vacuumlo to handle domains over oid 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