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

Re: patch: function xmltable

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(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 07:14:39
Message-ID: 20161207071439.qhfwbszhmmgqedyf@alvherre.pgsql (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Here's v21.

* I changed the grammar by moving the NOT NULL to the column options,
and removing the IsNotNull production.  It wasn't nice that "NOT NULL
DEFAULT 0" was not accepted, which it is with the new representation.

* The tuple that's returned is natively a TupleTableSlot inside the
table builder, not directly a HeapTuple.  That stuff was ugly and wasn't
using the proper abstraction anyway.

* I changed the signatures of the methods so that they receive
TableExprState, and restructured the "opaque" data to be inside
TableExprState.  Now we don't need to have things such as the tupdesc or
the input functions be repeated in the opaque struct.  Instead they
belong to the TableExprState and the methods can read them from there.

I managed to break the case with no COLUMNS.  Probably related to the
tupdesc changes.  It now crashes the regression test.  Too tired to
debug now; care to take a look?  The other stuff seems to run fine,
though of course the regression test crashes in the middle, so perhaps
there are other problems.

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

Attachment: xmltable-21.patch
Description: text/plain (166.2 KB)
Attachment: xmltable-21.patch
Description: text/plain (166.2 KB)

In response to


pgsql-hackers by date

Next:From: Michael PaquierDate: 2016-12-07 07:24:06
Subject: Re: Assignment of valid collation for SET operations on queries with UNKNOWN types.
Previous:From: Michael PaquierDate: 2016-12-07 07:05:50
Subject: Re: Quorum commit for multiple synchronous replication.

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