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

Commit840729f

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 parent1f5ef5a commit840729f

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
@@ -3673,7 +3673,7 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod)
36733673
caseTIMEOID:
36743674
caseTIMETZOID:
36753675
{
3676-
constchar*tz= (typeoid==TIMETZOID ?"(+|-)\\p{Nd}{2}:\\p{Nd}{2}" :"");
3676+
constchar*tz= (typeoid==TIMETZOID ?"(\\+|-)\\p{Nd}{2}:\\p{Nd}{2}" :"");
36773677

36783678
if (typmod==-1)
36793679
appendStringInfo(&result,
@@ -3696,7 +3696,7 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod)
36963696
caseTIMESTAMPOID:
36973697
caseTIMESTAMPTZOID:
36983698
{
3699-
constchar*tz= (typeoid==TIMESTAMPTZOID ?"(+|-)\\p{Nd}{2}:\\p{Nd}{2}" :"");
3699+
constchar*tz= (typeoid==TIMESTAMPTZOID ?"(\\+|-)\\p{Nd}{2}:\\p{Nd}{2}" :"");
37003700

37013701
if (typmod==-1)
37023702
appendStringInfo(&result,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp