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

Commit068739f

Browse files
committed
Fix incorrect xmlschema output for types timetz and timestamptz.
The output of table_to_xmlschema() and allied functions includesa regex describing valid values for these types ... but the regexwas itself invalid, as it failed to escape a literal "+" sign.Report and fix by Renan Soares Lopes. Back-patch to allsupported branches.Discussion:https://postgr.es/m/7f6fabaa-3f8f-49ab-89ca-59fbfe633105@me.com
1 parent0d3aaad commit068739f

File tree

4 files changed

+514
-438
lines changed

4 files changed

+514
-438
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3659,7 +3659,7 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod)
36593659
caseTIMEOID:
36603660
caseTIMETZOID:
36613661
{
3662-
constchar*tz= (typeoid==TIMETZOID ?"(+|-)\\p{Nd}{2}:\\p{Nd}{2}" :"");
3662+
constchar*tz= (typeoid==TIMETZOID ?"(\\+|-)\\p{Nd}{2}:\\p{Nd}{2}" :"");
36633663

36643664
if (typmod==-1)
36653665
appendStringInfo(&result,
@@ -3682,7 +3682,7 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod)
36823682
caseTIMESTAMPOID:
36833683
caseTIMESTAMPTZOID:
36843684
{
3685-
constchar*tz= (typeoid==TIMESTAMPTZOID ?"(+|-)\\p{Nd}{2}:\\p{Nd}{2}" :"");
3685+
constchar*tz= (typeoid==TIMESTAMPTZOID ?"(\\+|-)\\p{Nd}{2}:\\p{Nd}{2}" :"");
36863686

36873687
if (typmod==-1)
36883688
appendStringInfo(&result,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp