aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2012-05-10 09:11:38 +0200
committerMagnus Hagander <magnus@hagander.net>2012-05-10 09:12:51 +0200
commit71ca53608de1763c0d82bf463580a30f634eba56 (patch)
treeb003c16c23b83856603a521aa24b0f0e651b979f
parent05a86891232e1bd5e43d559f30bec2fc00131f37 (diff)
downloadpostgresql-71ca53608de1763c0d82bf463580a30f634eba56.tar.gz
postgresql-71ca53608de1763c0d82bf463580a30f634eba56.zip
Only attempt to show collations on servers >= 9.1.
Show a proper error message instead of a SQL error. Josh Kupershmidt
-rw-r--r--src/bin/psql/describe.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index b2c54b5f929..6df42fb957e 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2893,6 +2893,13 @@ listCollations(const char *pattern, bool verbose, bool showSystem)
printQueryOpt myopt = pset.popt;
static const bool translate_columns[] = {false, false, false, false, false};
+ if (pset.sversion < 90100)
+ {
+ fprintf(stderr, _("The server (version %d.%d) does not support collations.\n"),
+ pset.sversion / 10000, (pset.sversion / 100) % 100);
+ return true;
+ }
+
initPQExpBuffer(&buf);
printfPQExpBuffer(&buf,