Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread David Fetter
On Fri, Aug 25, 2006 at 08:37:19PM -0400, Bruce Momjian wrote:
> David Fetter wrote:
> > On Fri, Aug 25, 2006 at 07:46:57PM -0400, Bruce Momjian wrote:
> > > Here is an new XML section for our SGML documentation.  It
> > > explains the various XML capabilities, if we support them, and
> > > how to use them.
> > > 
> > > Comments?
> > 
> > This looks hauntingly similar to Peter's presentation at the
> 
> I used the XML/SQL and validation part from his talk, but the rest
> was from earlier email discussions.

Reuse is good :)

> > conference. :)  I'd add a http://wiscorp.com/SQLStandards.html to the
> 
> This seems to be the best URL, but it seems too detailed:
> 
>   
> http://wiscorp.com/H2-2005-197-SC32N1293-WG3_Presentation_for_SC32_20050418.pdf

I'd just put the http://wiscorp.com/SQLStandards.html URL in, as it
contains several references in varying levels of detail.

> > reference section.
> > 
> > Speaking of other parts of the SQL:2003 standard, how about one
> > section each that mentions them?  There's
> > 
> > Part 4: SQL/PSM (Persistent Stored Modules)
> > Part 9: SQL/MED (Management of External Data) (my favorite)
> > Part 10: SQL/OLB (Object Language Binding)
> > Part 11: SQL/Schemata
> > Part 13: SQL/JRT (Java Routines and Types)
> 
> I don't know anything about them.

We claim SQL standard compliance, so since those are part of SQL:2003,
we probably ought to mention them.  SQL/PSM is a programming language
that lives inside the database, and DB2 and MySQL have it.  SQL/MED
lets people talk to other data stores.  SQL/OLB appears to be derived
from equel, which we have as ecpg.  SQL/Schemata contains the
information schema.  SQL/JRT appears to bear some similarity to
PL/Java and PL/J.

Cheers,
D
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778AIM: dfetter666
  Skype: davidfetter

Remember to vote!

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [DOCS] New XML section for documentation

2006-08-26 Thread Bruce Momjian
Peter Eisentraut wrote:
> Bruce Momjian wrote:
> > XML Document Support
> > 
> > XML support is not one capability, but a variety of features
> > supported by a database.
> 
> database system

Done.

> > Storage
> > ---
> > PostgreSQL stores XML documents as ordinary text documents.
> 
> It is "possible" to do that, but this sounds like it's done 
> automatically or implicitly.  Maybe:
> 
> "PostgreSQL does not have a specialized XML data type.  The recommended 
> way is to store XML documents as text."

Clarified.

> > Import/Export
> > -
> > Because XML documents are stored as normal text documents, they can
> > be imported/exported with little complexity.
> 
> Import/export refers to exporting schema data with XML decorations.  Of 
> course you can export column data trivially, but that's not what this 
> is about.

OK, section redone.

> > Validation
> > --
> > /contrib/xml2 has a function called xml_valid() that can be used in
> > a CHECK constraint to enforce that a field contains valid XML.  It
> > does not support validation against a specific XML schema.
> 
> Then this is not validation but only checking for well-formedness.  The 
> xml2 README says so, in fact.

I made it clear in the section that the XML syntax was being checked,
not validation against a schema.  You want Check and Validation
sections?

> > Indexing
> > 
> 
> I think the expression index capability combined with contrib/xml2 is 
> more relevant here than the full-text search capability.

Agreed, added.

> > Transforming
> > 
> > /contrib/xml2 supports XSL transformations.
> 
> That's XSLT.

OK.

> > XML to SQL Mapping
> > ---
> > This involves converting XML data to and from relational structures.
> > PostgreSQL has no internal support for such mapping, and relies on
> > external tools to do such conversions.
> 
> Are there instances of such tools?

Well, it seems EMS has a product that does it, and I assume other XML
tools have database interfaces.  Also, psql can do it if you want to
convert XHTML to XML, so I mentioned that too.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [DOCS] New XML section for documentation

2006-08-26 Thread Bruce Momjian
Magnus Hagander wrote:
> > Indexing
> > 
> > Because XML documents are stored as text, full-text indexing tool
> > /contrib/tsearch2 can be used to index XML documents.  Of 
> > course, the searches are text searches, with no XML 
> > awareness, but tsearch2 can be used with other XML 
> > capabilities to dramatically reduce the amount of data 
> > processed at the XML level.
> 
> 
> You can also use a functional index and /contrib/xml2 to do limited
> XPath indexing. (Can't make it "subtree-aware" for example, unless you
> are willing to change your queries, but you can index specific xpath
> nodes). 

Good point, added.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread Bruce Momjian
David Fetter wrote:
> On Fri, Aug 25, 2006 at 08:37:19PM -0400, Bruce Momjian wrote:
> > David Fetter wrote:
> > > On Fri, Aug 25, 2006 at 07:46:57PM -0400, Bruce Momjian wrote:
> > > > Here is an new XML section for our SGML documentation.  It
> > > > explains the various XML capabilities, if we support them, and
> > > > how to use them.
> > > > 
> > > > Comments?
> > > 
> > > This looks hauntingly similar to Peter's presentation at the
> > 
> > I used the XML/SQL and validation part from his talk, but the rest
> > was from earlier email discussions.
> 
> Reuse is good :)
> 
> > > conference. :)  I'd add a http://wiscorp.com/SQLStandards.html to the
> > 
> > This seems to be the best URL, but it seems too detailed:
> > 
> > 
> > http://wiscorp.com/H2-2005-197-SC32N1293-WG3_Presentation_for_SC32_20050418.pdf
> 
> I'd just put the http://wiscorp.com/SQLStandards.html URL in, as it
> contains several references in varying levels of detail.

OK, added.

> > > reference section.
> > > 
> > > Speaking of other parts of the SQL:2003 standard, how about one
> > > section each that mentions them?  There's
> > > 
> > > Part 4: SQL/PSM (Persistent Stored Modules)
> > > Part 9: SQL/MED (Management of External Data) (my favorite)
> > > Part 10: SQL/OLB (Object Language Binding)
> > > Part 11: SQL/Schemata
> > > Part 13: SQL/JRT (Java Routines and Types)
> > 
> > I don't know anything about them.
> 
> We claim SQL standard compliance, so since those are part of SQL:2003,
> we probably ought to mention them.  SQL/PSM is a programming language
> that lives inside the database, and DB2 and MySQL have it.  SQL/MED
> lets people talk to other data stores.  SQL/OLB appears to be derived
> from equel, which we have as ecpg.  SQL/Schemata contains the
> information schema.  SQL/JRT appears to bear some similarity to
> PL/Java and PL/J.

I think the big question is whether we are ever going to implement
these?  I think we need to decide that before I mention them.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread David Fetter
On Sat, Aug 26, 2006 at 12:48:32PM -0400, Bruce Momjian wrote:
> David Fetter wrote:
> > On Fri, Aug 25, 2006 at 08:37:19PM -0400, Bruce Momjian wrote:

> > > > Speaking of other parts of the SQL:2003 standard, how about one
> > > > section each that mentions them?  There's
> > > > 
> > > > Part 4: SQL/PSM (Persistent Stored Modules)
> > > > Part 9: SQL/MED (Management of External Data) (my favorite)
> > > > Part 10: SQL/OLB (Object Language Binding)
> > > > Part 11: SQL/Schemata
> > > > Part 13: SQL/JRT (Java Routines and Types)
> > > 
> > > I don't know anything about them.
> > 
> > We claim SQL standard compliance, so since those are part of
> > SQL:2003, we probably ought to mention them.  SQL/PSM is a
> > programming language that lives inside the database, and DB2 and
> > MySQL have it.  SQL/MED lets people talk to other data stores.
> > SQL/OLB appears to be derived from equel, which we have as ecpg.
> > SQL/Schemata contains the information schema.  SQL/JRT appears to
> > bear some similarity to PL/Java and PL/J.
> 
> I think the big question is whether we are ever going to implement
> these?  I think we need to decide that before I mention them.

The SQL/Schemata thing is already in.  I think we should at least
mention which features that we already have are from what part of the
standard.  As far as the rest of the standard goes, we might want to
mention whether we've even considered any of each piece in the TODO
list, and what sub-pieces, if any, are already included/scheduled/too
silly to contemplate :)

Cheers,
D
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778AIM: dfetter666
  Skype: davidfetter

Remember to vote!

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread Bruce Momjian
David Fetter wrote:
> On Sat, Aug 26, 2006 at 12:48:32PM -0400, Bruce Momjian wrote:
> > David Fetter wrote:
> > > On Fri, Aug 25, 2006 at 08:37:19PM -0400, Bruce Momjian wrote:
> 
> > > > > Speaking of other parts of the SQL:2003 standard, how about one
> > > > > section each that mentions them?  There's
> > > > > 
> > > > > Part 4: SQL/PSM (Persistent Stored Modules)
> > > > > Part 9: SQL/MED (Management of External Data) (my favorite)
> > > > > Part 10: SQL/OLB (Object Language Binding)
> > > > > Part 11: SQL/Schemata
> > > > > Part 13: SQL/JRT (Java Routines and Types)
> > > > 
> > > > I don't know anything about them.
> > > 
> > > We claim SQL standard compliance, so since those are part of
> > > SQL:2003, we probably ought to mention them.  SQL/PSM is a
> > > programming language that lives inside the database, and DB2 and
> > > MySQL have it.  SQL/MED lets people talk to other data stores.
> > > SQL/OLB appears to be derived from equel, which we have as ecpg.
> > > SQL/Schemata contains the information schema.  SQL/JRT appears to
> > > bear some similarity to PL/Java and PL/J.
> > 
> > I think the big question is whether we are ever going to implement
> > these?  I think we need to decide that before I mention them.
> 
> The SQL/Schemata thing is already in.  I think we should at least

Uh, what is the SQL/Schemata?  Are you sure it is in CVS?

> mention which features that we already have are from what part of the
> standard.  As far as the rest of the standard goes, we might want to
> mention whether we've even considered any of each piece in the TODO
> list, and what sub-pieces, if any, are already included/scheduled/too
> silly to contemplate :)

Well, this seems like something that belongs in our chapter on how we
support the SQL standard.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread David Fetter
On Sat, Aug 26, 2006 at 01:16:06PM -0400, Bruce Momjian wrote:
> David Fetter wrote:
> > On Sat, Aug 26, 2006 at 12:48:32PM -0400, Bruce Momjian wrote:
> > > David Fetter wrote:
> > > > On Fri, Aug 25, 2006 at 08:37:19PM -0400, Bruce Momjian wrote:
> > 
> > > > > > Speaking of other parts of the SQL:2003 standard, how about one
> > > > > > section each that mentions them?  There's
> > > > > > 
> > > > > > Part 4: SQL/PSM (Persistent Stored Modules)
> > > > > > Part 9: SQL/MED (Management of External Data) (my favorite)
> > > > > > Part 10: SQL/OLB (Object Language Binding)
> > > > > > Part 11: SQL/Schemata
> > > > > > Part 13: SQL/JRT (Java Routines and Types)
> > > > > 
> > > > > I don't know anything about them.
> > > > 
> > > > We claim SQL standard compliance, so since those are part of
> > > > SQL:2003, we probably ought to mention them.  SQL/PSM is a
> > > > programming language that lives inside the database, and DB2 and
> > > > MySQL have it.  SQL/MED lets people talk to other data stores.
> > > > SQL/OLB appears to be derived from equel, which we have as ecpg.
> > > > SQL/Schemata contains the information schema.  SQL/JRT appears to
> > > > bear some similarity to PL/Java and PL/J.
> > > 
> > > I think the big question is whether we are ever going to implement
> > > these?  I think we need to decide that before I mention them.
> > 
> > The SQL/Schemata thing is already in.  I think we should at least
> 
> Uh, what is the SQL/Schemata?  Are you sure it is in CVS?

It contains the information schema, among other things.  We've had the
information schema for awhile. :)

> > mention which features that we already have are from what part of
> > the standard.  As far as the rest of the standard goes, we might
> > want to mention whether we've even considered any of each piece in
> > the TODO list, and what sub-pieces, if any, are already
> > included/scheduled/too silly to contemplate :)
> 
> Well, this seems like something that belongs in our chapter on how
> we support the SQL standard.

I'm not too fussy about where it first goes in.  Just *that* it goes
in somewhere.  I'll be happy to start the needed patches. :)

Cheers,
D
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778AIM: dfetter666
  Skype: davidfetter

Remember to vote!

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread Bruce Momjian
David Fetter wrote:
> > > mention which features that we already have are from what part of
> > > the standard.  As far as the rest of the standard goes, we might
> > > want to mention whether we've even considered any of each piece in
> > > the TODO list, and what sub-pieces, if any, are already
> > > included/scheduled/too silly to contemplate :)
> > 
> > Well, this seems like something that belongs in our chapter on how
> > we support the SQL standard.
> 
> I'm not too fussy about where it first goes in.  Just *that* it goes
> in somewhere.  I'll be happy to start the needed patches. :)

OK, I think the SGML docs are the proper place.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread Peter Eisentraut
David Fetter wrote:
> We claim SQL standard compliance,

No, we don't.  And SQL conformance doesn't require you to implement all 
parts anyway.

> so since those are part of 
> SQL:2003, we probably ought to mention them.  SQL/PSM is a
> programming language that lives inside the database, and DB2 and
> MySQL have it.  SQL/MED lets people talk to other data stores. 
> SQL/OLB appears to be derived from equel, which we have as ecpg. 
> SQL/Schemata contains the information schema.  SQL/JRT appears to
> bear some similarity to PL/Java and PL/J.

It's pretty useless to talk about stuff that we don't have yet.  The 
point of the XML section is that we have a number of things, and users 
are having trouble (understandably) fitting them together.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [DOCS] New XML section for documentation

2006-08-26 Thread Peter Eisentraut
Bruce Momjian wrote:
> I made it clear in the section that the XML syntax was being checked,
> not validation against a schema.  You want Check and Validation
> sections?

"Valid" and "well-formed" have very specific distinct meanings in XML.  
(Note that "check" doesn't have any meaning there.)  We will eventually 
want a method to verify both the validity and the well-formedness.

I think that a function called xml_valid checks for well-formedness is 
an outright bug and needs to be fixed.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread Peter Eisentraut
David Fetter wrote:
> The SQL/Schemata thing is already in.  I think we should at least
> mention which features that we already have are from what part of the
> standard.

We do.  Read the documentation.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread Joshua D. Drake

Peter Eisentraut wrote:

David Fetter wrote:

We claim SQL standard compliance,


No, we don't.  And SQL conformance doesn't require you to implement all 
parts anyway.


so since those are part of 
SQL:2003, we probably ought to mention them.  SQL/PSM is a

programming language that lives inside the database, and DB2 and
MySQL have it.  SQL/MED lets people talk to other data stores. 
SQL/OLB appears to be derived from equel, which we have as ecpg. 
SQL/Schemata contains the information schema.  SQL/JRT appears to

bear some similarity to PL/Java and PL/J.


It's pretty useless to talk about stuff that we don't have yet.  The 
point of the XML section is that we have a number of things, and users 
are having trouble (understandably) fitting them together.


As separate sections I agree with Peter. However it would be a good idea 
to have a section that talks about Potential and/or Upcoming technologies.


All of the above could be covered under that.

Joshua D. Drake







--

   === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
   Providing the most comprehensive  PostgreSQL solutions since 1997
 http://www.commandprompt.com/



---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread David Fetter
On Sat, Aug 26, 2006 at 08:38:43PM +0200, Peter Eisentraut wrote:
> David Fetter wrote:
> > We claim SQL standard compliance,
> 
> No, we don't.  And SQL conformance doesn't require you to implement
> all parts anyway.

Right.  It'd be nice to be able to tell what level of conformance we
have to which parts of the standard.

> > so since those are part of SQL:2003, we probably ought to mention
> > them.  SQL/PSM is a programming language that lives inside the
> > database, and DB2 and MySQL have it.  SQL/MED lets people talk to
> > other data stores.  SQL/OLB appears to be derived from equel,
> > which we have as ecpg.  SQL/Schemata contains the information
> > schema.  SQL/JRT appears to bear some similarity to PL/Java and
> > PL/J.
> 
> It's pretty useless to talk about stuff that we don't have yet.

I think it's useful to mention what's arriving, what's being worked
on, and what's not even being contemplated in the long term.

> The point of the XML section is that we have a number of things, and
> users are having trouble (understandably) fitting them together.

Similar troubles apply--on a smaller scale--to the information schema,
SQL/OLB, SQL/JRT, etc.

Cheers,
D
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778AIM: dfetter666
  Skype: davidfetter

Remember to vote!

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [DOCS] [HACKERS] New XML section for documentation

2006-08-26 Thread Joshua D. Drake

bear some similarity to PL/Java and PL/J.

I think the big question is whether we are ever going to implement
these?  I think we need to decide that before I mention them.


The SQL/Schemata thing is already in.  I think we should at least
mention which features that we already have are from what part of the
standard. 


I also see PSM and OLB as a target.

Joshua D. Drake



As far as the rest of the standard goes, we might want to
mention whether we've even considered any of each piece in the TODO
list, and what sub-pieces, if any, are already included/scheduled/too
silly to contemplate :)

Cheers,
D



--

   === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
   Providing the most comprehensive  PostgreSQL solutions since 1997
 http://www.commandprompt.com/



---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster