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

Commit96ee6ff

Browse files
committed
Fix XML Schema structure for char types without length (bug #3782)
1 parent2609345 commit96ee6ff

File tree

1 file changed

+7
-4
lines changed
  • src/backend/utils/adt

1 file changed

+7
-4
lines changed

‎src/backend/utils/adt/xml.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
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 $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -2984,19 +2984,22 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod)
29842984
caseBPCHAROID:
29852985
caseVARCHAROID:
29862986
caseTEXTOID:
2987+
appendStringInfo(&result,
2988+
" <xsd:restriction base=\"xsd:string\">\n");
29872989
if (typmod!=-1)
29882990
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",
29922992
typmod-VARHDRSZ);
2993+
appendStringInfo(&result,
2994+
" </xsd:restriction>\n");
29932995
break;
29942996

29952997
caseBYTEAOID:
29962998
appendStringInfo(&result,
29972999
" <xsd:restriction base=\"xsd:%s\">\n"
29983000
" </xsd:restriction>\n",
29993001
xmlbinary==XMLBINARY_BASE64 ?"base64Binary" :"hexBinary");
3002+
break;
30003003

30013004
caseNUMERICOID:
30023005
if (typmod!=-1)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp