Re: Proposal for XML Schema Validation

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: "Kodamasimham Pridhvi (MT2012066)" <Pridhvi(dot)Kodamasimham(at)iiitb(dot)org>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Bisen Vikrantsingh Mohansingh MT2012036 <BisenVikrantsingh(dot)Mohansingh(at)iiitb(dot)org>
Subject: Re: Proposal for XML Schema Validation
Date: 2013-08-09 14:14:34
Message-ID: 5204F94A.1050308@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/09/2013 05:55 PM, Kodamasimham Pridhvi (MT2012066) wrote:

> (B) Alter Table
>
> Only sole purpose of making use of keyword USE_SCHEMA is to mimic oracle (somewhere on
> oracle site i found this type of syntax)

Well, there's certainly precedent for that - see to_char, the various
different BEGIN permutations, etc.

I would suggest doing that as a second separate step though. First
produce a function based interface that can be tried and tested without
the need to mess with the syntax and the parser. Then once that's in
good shape propose a patch that adds the compatibility syntax.

Among other things, if you're not adding new syntax you're more likely
to be able to prototype this as an extension.

I'm very far from being an expert in getting patches into Pg, though, so
please don't just take my word for it.

> I may not be correct but check constraint is only used to
> limit the value ranges.

A CHECK constraint can be any logic that refers only to the current row.

Using it with non-immutable (stable/volatile) functions isn't prevented,
but is also not a great idea, so updating an xsd would be a concern, but
it'd otherwise be fine.

> yes , there are memory management related issue with libxml as mentioned on below link
> http://wiki.postgresql.org/wiki/XML_Support#Implementation_Issues
> It is also mention there that this issue can be resolved(how? don't know!).

Well, if you're planning on relying on libxml in core (and it'll have to
be in core if you're adding new syntax) then you'll need a solid, well
researched answer to that one or an alternative XML library that's
portable and doesn't have those issues.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-08-09 14:18:22 Re: mvcc catalo gsnapshots and TopTransactionContext
Previous Message Robert Haas 2013-08-09 13:12:03 Re: CREATE EVENT TRIGGER syntax