OSDN Git Service

Show encoding name rather than encoding id in case of psql -l.
authorTatsuo Ishii <ishii@postgresql.org>
Tue, 18 Jan 2000 05:11:38 +0000 (05:11 +0000)
committerTatsuo Ishii <ishii@postgresql.org>
Tue, 18 Jan 2000 05:11:38 +0000 (05:11 +0000)
src/bin/psql/describe.c

index 1d54483..1ddc9b2 100644 (file)
@@ -282,7 +282,7 @@ listAllDbs(bool desc)
                   "       pg_user.usename as \"Owner\"");
 #ifdef MULTIBYTE
        strcat(buf,
-                  ",\n       pg_database.encoding as \"Encoding\"");
+                  ",\n       pg_encoding_to_char(pg_database.encoding) as \"Encoding\"");
 #endif
        if (desc)
                strcat(buf, ",\n       obj_description(pg_database.oid) as \"Description\"\n");
@@ -297,7 +297,7 @@ listAllDbs(bool desc)
                   "       NULL as \"Owner\"");
 #ifdef MULTIBYTE
        strcat(buf,
-                  ",\n       pg_database.encoding as \"Encoding\"");
+                  ",\n       pg_encoding_to_char(pg_database.encoding) as \"Encoding\"");
 #endif
        if (desc)
                strcat(buf, ",\n       obj_description(pg_database.oid) as \"Description\"\n");