Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f33c5d4

Browse files
committed
Only attempt to show collations on servers >= 9.1.
Show a proper error message instead of a SQL error. Josh Kupershmidt
1 parent 60a3dff commit f33c5d4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/bin/psql/describe.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3061,6 +3061,13 @@ listCollations(const char *pattern, bool verbose, bool showSystem)
30613061
printQueryOpt myopt = pset.popt;
30623062
static const bool translate_columns[] = {false, false, false, false, false};
30633063

3064+
if (pset.sversion < 90100)
3065+
{
3066+
fprintf(stderr, _("The server (version %d.%d) does not support collations.\n"),
3067+
pset.sversion / 10000, (pset.sversion / 100) % 100);
3068+
return true;
3069+
}
3070+
30643071
initPQExpBuffer(&buf);
30653072

30663073
printfPQExpBuffer(&buf,

0 commit comments

Comments
 (0)