Re: Proposal for XML Schema Validation - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Proposal for XML Schema Validation
Date
Msg-id 52045A7F.3000604@2ndquadrant.com
Whole thread Raw
In response to Re: Proposal for XML Schema Validation  ("Kodamasimham Pridhvi (MT2012066)" <Pridhvi.Kodamasimham@iiitb.org>)
Responses Re: Proposal for XML Schema Validation  ("Kodamasimham Pridhvi (MT2012066)" <Pridhvi.Kodamasimham@iiitb.org>)
Re: Proposal for XML Schema Validation  (Bisen Vikrantsingh Mohansingh MT2012036 <BisenVikrantsingh.Mohansingh@iiitb.org>)
List pgsql-hackers
On 08/09/2013 12:39 AM, Kodamasimham Pridhvi (MT2012066) wrote:
>                                                              
> Objective: To Add XML Schema validation and xmlvalidate functions (SQL:2008)
> 
> Description:
> We’ve gone through current support of xml in postgreSQL and found that there is a check for well-formedness of xml
documentwhile inserting and updating. We want to extend this feature by adding xml schema validation.
 
>      We will be providing user with DDL commands for creating and deleting XML Schema, also provision of associating
xmlschema with table while creation of new table or while altering table structure, we are planning to use libxml2
library.Proposed syntax is given below.
 

The first thing that comes to mind here is "what if the user wants to
update/replace the schema" ? How would you handle re-validating the fields?

Sure, updating XML schemas is not a great idea, but it doesn't stop
people doing it. It might be reasonable to say "if you want to do this
you have to drop the dependent constraints, drop the schema, re-create
the schema and re-create the schema constraints" though.

Why extend the create table / alter table syntax with "USE_SCHEMA"? Is
there a compatibility/standards reason to do this? If not, what
advantage does this provide over using a suitable CHECK constraint?

IIRC there were some memory management issues with libxml2 in Pg. Anyone
remember anything about that?

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Proposal: leave a hint when switching logging away from stderr
Next
From: Tomonari Katsumata
Date:
Subject: Re: Should we remove "not fast" promotion at all?