Re: Syntax of xmltable function

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Syntax of xmltable function
Date: 2016-08-01 06:40:14
Message-ID: CAFj8pRA83ky8CAjwBRBCK9atgvL19prfw9biHc8ORBaRL8UCuw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2016-07-31 17:53 GMT+02:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> > 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.
>
> > 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.
>
> ISTM that the ordering of those two clauses is totally arbitrary, and
> that if you're going to worry about Oracle at all, it'd be best to allow
> both orderings.
>

ok. I checked it - and it is possible.

Regards

Pavel

>
> regards, tom lane
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2016-08-01 07:19:21 Re: Combining hash values
Previous Message Gavin Flower 2016-08-01 06:17:30 Re: System load consideration before spawning parallel workers