Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit51e0fe5

Browse files
author
Thomas G. Lockhart
committed
Improve informational messages for "show" command responses.
1 parentf8d4b3c commit51e0fe5

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

‎src/backend/tcop/variable.c

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Routines for handling of 'SET var TO', 'SHOW var' and 'RESET var'
33
* statements.
44
*
5-
* $Id: variable.c,v 1.7 1997/04/29 04:38:58 vadim Exp $
5+
* $Id: variable.c,v 1.8 1997/05/16 07:24:13 thomas Exp $
66
*
77
*/
88

@@ -191,7 +191,7 @@ static bool parse_date(const char *value)
191191
}
192192
else
193193
{
194-
elog(WARN,"Bad value for date (%s)",tok);
194+
elog(WARN,"Bad value for datestyle(%s)",tok);
195195
}
196196
}
197197

@@ -205,9 +205,21 @@ static bool show_date()
205205
{
206206
charbuf[64];
207207

208-
sprintf(buf,"Date style is %s with%s European conventions",
209-
((DateStyle==USE_ISO_DATES)?"iso": ((DateStyle==USE_ISO_DATES)?"sql":"postgres")),
210-
((EuroDates)?"":"out"));
208+
strcpy(buf,"DateStyle is ");
209+
switch (DateStyle) {
210+
caseUSE_ISO_DATES:
211+
strcat(buf,"ISO");
212+
break;
213+
caseUSE_SQL_DATES:
214+
strcat(buf,"SQL");
215+
break;
216+
default:
217+
strcat(buf,"Postgres");
218+
break;
219+
};
220+
strcat(buf," with ");
221+
strcat(buf, ((EuroDates)?"European":"US (NonEuropean)"));
222+
strcat(buf," conventions");
211223

212224
elog(NOTICE,buf,NULL);
213225

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp