|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.130 2007/05/30 19:38:05 neilc Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.131 2007/06/02 16:41:09 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -918,8 +918,9 @@ text_date(PG_FUNCTION_ARGS) |
918 | 918 | ereport(ERROR, |
919 | 919 | (errcode(ERRCODE_INVALID_DATETIME_FORMAT), |
920 | 920 | errmsg("invalid input syntax for type date: \"%s\"", |
921 | | -VARDATA(str)))); |
922 | | - |
| 921 | +DatumGetCString(DirectFunctionCall1(textout, |
| 922 | +PointerGetDatum(str)))))); |
| 923 | + |
923 | 924 | sp=VARDATA(str); |
924 | 925 | dp=dstr; |
925 | 926 | for (i=0;i< (VARSIZE(str)-VARHDRSZ);i++) |
@@ -1659,7 +1660,8 @@ text_time(PG_FUNCTION_ARGS) |
1659 | 1660 | ereport(ERROR, |
1660 | 1661 | (errcode(ERRCODE_INVALID_DATETIME_FORMAT), |
1661 | 1662 | errmsg("invalid input syntax for type time: \"%s\"", |
1662 | | -VARDATA(str)))); |
| 1663 | +DatumGetCString(DirectFunctionCall1(textout, |
| 1664 | +PointerGetDatum(str)))))); |
1663 | 1665 |
|
1664 | 1666 | len=VARSIZE(str)-VARHDRSZ; |
1665 | 1667 | memcpy(dstr,VARDATA(str),len); |
@@ -2443,7 +2445,8 @@ text_timetz(PG_FUNCTION_ARGS) |
2443 | 2445 | ereport(ERROR, |
2444 | 2446 | (errcode(ERRCODE_INVALID_DATETIME_FORMAT), |
2445 | 2447 | errmsg("invalid input syntax for type time with time zone: \"%s\"", |
2446 | | -VARDATA(str)))); |
| 2448 | +DatumGetCString(DirectFunctionCall1(textout, |
| 2449 | +PointerGetDatum(str)))))); |
2447 | 2450 |
|
2448 | 2451 | sp=VARDATA(str); |
2449 | 2452 | dp=dstr; |
|