diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-16 14:02:28 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-16 14:02:28 -0500 |
commit | cf0cab868aa4758b7eec5f9412f2ec74acda7f45 (patch) | |
tree | 08134fff4f15b4609259765407e391e671bdd1bb /src/bin/psql/large_obj.c | |
parent | c49d926833fa6a987e3f9a66027f4a01d7a008be (diff) |
Remove psql support for server versions preceding 9.2.
Per discussion, we'll limit support for old servers to those branches
that can still be built easily on modern platforms, which as of now
is 9.2 and up.
Aside from removing code that is dead per the assumption of
server >= 9.2, I tweaked the startup warning for unsupported versions
to complain about too-old servers as well as too-new ones. The
warning that "Some psql features might not work" applies precisely
to both cases.
Discussion: https://postgr.es/m/2923349.1634942313@sss.pgh.pa.us
Diffstat (limited to 'src/bin/psql/large_obj.c')
-rw-r--r-- | src/bin/psql/large_obj.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/src/bin/psql/large_obj.c b/src/bin/psql/large_obj.c index c15fcc08851..10e47c87ac9 100644 --- a/src/bin/psql/large_obj.c +++ b/src/bin/psql/large_obj.c @@ -277,28 +277,15 @@ do_lo_list(void) char buf[1024]; printQueryOpt myopt = pset.popt; - if (pset.sversion >= 90000) - { - snprintf(buf, sizeof(buf), - "SELECT oid as \"%s\",\n" - " pg_catalog.pg_get_userbyid(lomowner) as \"%s\",\n" - " pg_catalog.obj_description(oid, 'pg_largeobject') as \"%s\"\n" - " FROM pg_catalog.pg_largeobject_metadata " - " ORDER BY oid", - gettext_noop("ID"), - gettext_noop("Owner"), - gettext_noop("Description")); - } - else - { - snprintf(buf, sizeof(buf), - "SELECT loid as \"%s\",\n" - " pg_catalog.obj_description(loid, 'pg_largeobject') as \"%s\"\n" - "FROM (SELECT DISTINCT loid FROM pg_catalog.pg_largeobject) x\n" - "ORDER BY 1", - gettext_noop("ID"), - gettext_noop("Description")); - } + snprintf(buf, sizeof(buf), + "SELECT oid as \"%s\",\n" + " pg_catalog.pg_get_userbyid(lomowner) as \"%s\",\n" + " pg_catalog.obj_description(oid, 'pg_largeobject') as \"%s\"\n" + " FROM pg_catalog.pg_largeobject_metadata " + " ORDER BY oid", + gettext_noop("ID"), + gettext_noop("Owner"), + gettext_noop("Description")); res = PSQLexec(buf); if (!res) |