postgres.git / summary / log / commit / refs
commit 71ca53608de1763c0d82bf463580a30f634eba56
Author: Magnus Hagander <magnus@hagander.net>
Date: Thu May 10 07:11:38 2012 +0000
First released in: 9.2.0, 9.1.4
Only attempt to show collations on servers >= 9.1.
Show a proper error message instead of a SQL error.
Josh Kupershmidt
src/bin/psql/describe.c | 7 +++++++
1 file changed, 7 insertions(+)
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,
[parent: 05a86891232e]