|
7 | 7 | * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group |
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California |
9 | 9 | * |
10 | | - * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.62 2007/11/27 18:13:01 tgl Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.63 2007/11/28 14:01:51 petere Exp $ |
11 | 11 | * |
12 | 12 | *------------------------------------------------------------------------- |
13 | 13 | */ |
@@ -2984,19 +2984,22 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod) |
2984 | 2984 | caseBPCHAROID: |
2985 | 2985 | caseVARCHAROID: |
2986 | 2986 | caseTEXTOID: |
| 2987 | +appendStringInfo(&result, |
| 2988 | +" <xsd:restriction base=\"xsd:string\">\n"); |
2987 | 2989 | if (typmod!=-1) |
2988 | 2990 | appendStringInfo(&result, |
2989 | | -" <xsd:restriction base=\"xsd:string\">\n" |
2990 | | -" <xsd:maxLength value=\"%d\"/>\n" |
2991 | | -" </xsd:restriction>\n", |
| 2991 | +" <xsd:maxLength value=\"%d\"/>\n", |
2992 | 2992 | typmod-VARHDRSZ); |
| 2993 | +appendStringInfo(&result, |
| 2994 | +" </xsd:restriction>\n"); |
2993 | 2995 | break; |
2994 | 2996 |
|
2995 | 2997 | caseBYTEAOID: |
2996 | 2998 | appendStringInfo(&result, |
2997 | 2999 | " <xsd:restriction base=\"xsd:%s\">\n" |
2998 | 3000 | " </xsd:restriction>\n", |
2999 | 3001 | xmlbinary==XMLBINARY_BASE64 ?"base64Binary" :"hexBinary"); |
| 3002 | +break; |
3000 | 3003 |
|
3001 | 3004 | caseNUMERICOID: |
3002 | 3005 | if (typmod!=-1) |
|