[PATCH] Add support to table_to_xmlschema regex when timestamp has time zone

Lists: pgsql-hackers
From: Renan Soares Lopes <renans(dot)l(at)icloud(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [PATCH] Add support to table_to_xmlschema regex when timestamp has time zone
Date: 2022-02-18 17:47:14
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

Hello,I added a patch to fix table_to_xmlschema, could you point me how to add a unit test to that?


From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: "Renan Soares Lopes" <renans(dot)l(at)icloud(dot)com>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add support to table_to_xmlschema regex when timestamp has time zone
Date: 2022-02-18 19:10:36
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Feb 18, 2022, at 2:47 PM, Renan Soares Lopes wrote:
> Hello,
>
> I added a patch to fix table_to_xmlschema, could you point me how to add a unit test to that?
You should edit src/test/regress/expected/xmlmap.out. In this case, you should
also modify src/test/regress/expected/xmlmap_1.out that the output from this
test when you build without libxml support. Run 'make check' to test your fix
after building with/without libxml support.

Regarding this fix, it looks good to me. FWIW, character class escape is
defined here [1].

[1] https://www.w3.org/TR/xmlschema11-2/#cces

--
Euler Taveira
EDB https://www.enterprisedb.com/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Euler Taveira" <euler(at)eulerto(dot)com>
Cc: "Renan Soares Lopes" <renans(dot)l(at)icloud(dot)com>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add support to table_to_xmlschema regex when timestamp has time zone
Date: 2022-03-18 20:02:49
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

"Euler Taveira" <euler(at)eulerto(dot)com> writes:
> On Fri, Feb 18, 2022, at 2:47 PM, Renan Soares Lopes wrote:
>> I added a patch to fix table_to_xmlschema, could you point me how to add a unit test to that?

> You should edit src/test/regress/expected/xmlmap.out. In this case, you should
> also modify src/test/regress/expected/xmlmap_1.out that the output from this
> test when you build without libxml support. Run 'make check' to test your fix
> after building with/without libxml support.

> Regarding this fix, it looks good to me. FWIW, character class escape is
> defined here [1].

LGTM too. Pushed after rethinking the test case a bit.

regards, tom lane