Skip site navigation (1) Skip section navigation (2)

Re: patch: function xmltable

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: function xmltable
Date: 2016-12-07 19:37:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
2016-12-07 18:34 GMT+01:00 Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>:

> Pavel Stehule wrote:
> > I fixed two issues.
> >
> > 2. there was reverse setting in NOT NULL flag
> Ah-hah, that was silly, thanks.
> > 1. there are not columns data when there are not any explicit column -
> fixed
> Hmm.  Now that I see how this works, by having the GetValue "guess" what
> is going on and have a special case for it, I actually don't like it
> very much.  It seems way too magical.  I think we should do away with
> the "if column is NULL" case in GetValue, and instead inject a column
> during transformTableExpr if columns is NIL.  This has implications on
> ExecInitExpr too, which currently checks for an empty column list -- it
> would no longer have to do so.

I prefer this way against second described. The implementation should be in
table builder routines, not in executor.

sending new update



> Maybe this means we need an additional method, which would request "the
> expr that returns the whole row", so that transformExpr can work for
> XmlTable (which I think would be something like "./") and the future
> JsonTable stuff (I don't know how that one would work, but I assume it's
> not necessarily the same thing).

> --
> Álvaro Herrera      
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment: xmltable-23.patch
Description: text/x-patch (167.0 KB)

In response to


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2016-12-07 19:50:49
Subject: Re: patch: function xmltable
Previous:From: Joseph BrennerDate: 2016-12-07 18:58:56
Subject: Re: [GENERAL] Select works only when connected from login postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group