Skip to content
Snippets Groups Projects
Commit 51e0fe5c authored by Thomas G. Lockhart's avatar Thomas G. Lockhart
Browse files

Improve informational messages for "show" command responses.

parent f8d4b3cf
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Routines for handling of 'SET var TO', 'SHOW var' and 'RESET var' * Routines for handling of 'SET var TO', 'SHOW var' and 'RESET var'
* statements. * statements.
* *
* $Id: variable.c,v 1.7 1997/04/29 04:38:58 vadim Exp $ * $Id: variable.c,v 1.8 1997/05/16 07:24:13 thomas Exp $
* *
*/ */
...@@ -191,7 +191,7 @@ static bool parse_date(const char *value) ...@@ -191,7 +191,7 @@ static bool parse_date(const char *value)
} }
else else
{ {
elog(WARN, "Bad value for date (%s)", tok); elog(WARN, "Bad value for date style (%s)", tok);
} }
} }
...@@ -205,9 +205,21 @@ static bool show_date() ...@@ -205,9 +205,21 @@ static bool show_date()
{ {
char buf[64]; char buf[64];
sprintf( buf, "Date style is %s with%s European conventions", strcpy( buf, "DateStyle is ");
((DateStyle == USE_ISO_DATES)? "iso": ((DateStyle == USE_ISO_DATES)? "sql": "postgres")), switch (DateStyle) {
((EuroDates)? "": "out")); case USE_ISO_DATES:
strcat( buf, "ISO");
break;
case USE_SQL_DATES:
strcat( buf, "SQL");
break;
default:
strcat( buf, "Postgres");
break;
};
strcat( buf, " with ");
strcat( buf, ((EuroDates)? "European": "US (NonEuropean)"));
strcat( buf, " conventions");
elog(NOTICE, buf, NULL); elog(NOTICE, buf, NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment