From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Syntax of xmltable function |
Date: | 2016-07-31 09:37:24 |
Message-ID: | CAFj8pRDEy1P5SvDrCk8bqSjiP5SUF2OfPQ+diLxENw421rwv-Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi
I am working on xmltable function. This function is used for simple data
extraction from XML documents. In this moment I am working on prototype's
parser.
The SQL/XML syntax is:
XMLTABLE (
xmlquery
PASSING xmldocument
[COLUMNS columns_list] )
columns_list := column_list ',' colname
colname := colname datatype [DEFAULT value] [PATH text]
The DEFAULT clause is before PATH clause.
I am able to implement the default clause with c_expr - It is enough for
almost all usage.
What is question?
A Oracle db uses little bit different syntax - the DEFAULT and PATH clause
are in different order. This is little bit better for Postgres too - now I
can use a_expr in DEFAULT clause - what can be little bit better for other
than text types.
What should be preferrable? ANSI SQL syntax or Oracle syntax? This is not
often task - I didn't find any example with DEFAULT clause for Oracle.
DB2 and Sybase uses exact ANSI SQL syntax.
Regards
Pavel
From | Date | Subject | |
---|---|---|---|
Next Message | Shay Rojansky | 2016-07-31 12:08:41 | Slowness of extended protocol |
Previous Message | mitro palmnik | 2016-07-31 07:42:08 | programming libraries - collection of hash-fuctions and indexes for all situations from dbms till 3d-graphics? |