|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/utils/adt/format_type.c,v 1.16 2001/09/28 08:09:10 thomas Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/utils/adt/format_type.c,v 1.17 2001/10/03 18:32:42 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -200,16 +200,36 @@ format_type_internal(Oid type_oid, int32 typemod, bool allow_invalid)
|
200 | 200 | buf=pstrdup("numeric");
|
201 | 201 | break;
|
202 | 202 |
|
| 203 | +caseTIMEOID: |
| 204 | +if (with_typemod&&typemod>0) |
| 205 | +buf=psnprintf(50,"time(%d) without time zone", |
| 206 | +typemod); |
| 207 | +else |
| 208 | +buf=pstrdup("time without time zone"); |
| 209 | +break; |
| 210 | + |
203 | 211 | caseTIMETZOID:
|
204 |
| -buf=pstrdup("time with time zone"); |
| 212 | +if (with_typemod&&typemod>0) |
| 213 | +buf=psnprintf(50,"time(%d) with time zone", |
| 214 | +typemod); |
| 215 | +else |
| 216 | +buf=pstrdup("time with time zone"); |
205 | 217 | break;
|
206 | 218 |
|
207 | 219 | caseTIMESTAMPOID:
|
208 |
| -buf=pstrdup("timestamp without time zone"); |
| 220 | +if (with_typemod&&typemod>0) |
| 221 | +buf=psnprintf(50,"timestamp(%d) without time zone", |
| 222 | +typemod); |
| 223 | +else |
| 224 | +buf=pstrdup("timestamp without time zone"); |
209 | 225 | break;
|
210 | 226 |
|
211 | 227 | caseTIMESTAMPTZOID:
|
212 |
| -buf=pstrdup("timestamp with time zone"); |
| 228 | +if (with_typemod&&typemod>0) |
| 229 | +buf=psnprintf(50,"timestamp(%d) with time zone", |
| 230 | +typemod); |
| 231 | +else |
| 232 | +buf=pstrdup("timestamp with time zone"); |
213 | 233 | break;
|
214 | 234 |
|
215 | 235 | caseVARBITOID:
|
|