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

Re: Function scan push-down using SQL/MED syntax

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-cluster-hackers(at)postgresql(dot)org
Subject: Re: Function scan push-down using SQL/MED syntax
Date: 2010-03-08 00:44:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-cluster-hackers
Josh Berkus <josh(at)agliodbs(dot)com> wrote:

> It would be really good to have access to the scan criteria as text, a
> hash, or other generally manipulable data structures, as well, for
> foreign data which is not SQL-based.

We can provide such formatter functions as options. In fact, the present
postgresql_fdw uses deparse_context_for_plan() and deparse_expression()
exported from the core. However, I think the conversion should be
performed in each FDW because some of FDW don't necessary need the
criteria. For example, CSV-FDW will just return the all of the contents
as tuples, and the common executor routine will filter and modify them.

> Finally, if you are making the scan more visible, a nice side effect of
> this would be the ability to log all the scan criteria on a particular
> table (whether its an FDW or not); it would help a lot with indexing.

We might need to provide more useful deparse_xxx() functions for general
uses. For example, oracle_fdw also requires deparsing criteria to a SQL.
It would be almost the same as PostgreSQL, but also require to remap
incompatible functions and expressions in their preferred ways.

Takahiro Itagaki
NTT Open Source Software Center

In response to

pgsql-cluster-hackers by date

Next:From: Takahiro ItagakiDate: 2010-03-08 01:01:27
Subject: Re: Function scan push-down using SQL/MED syntax
Previous:From: Takahiro ItagakiDate: 2010-03-08 00:32:00
Subject: Re: Function scan push-down using SQL/MED syntax

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