Re: FDW for PostgreSQL - Mailing list pgsql-hackers

From Kohei KaiGai
Subject Re: FDW for PostgreSQL
Date
Msg-id CADyhKSXCqHVb0nio1UjgaKNqWPs_nmnS_ioJopnUPXpupTA1Vg@mail.gmail.com
Whole thread Raw
In response to Re: FDW for PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: FDW for PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
2013/2/14 Tom Lane <tgl@sss.pgh.pa.us>:
> * deparse.c contains a depressingly large amount of duplication of logic
> from ruleutils.c, and can only need more as we expand the set of
> constructs that can be pushed to the remote end.  This doesn't seem like
> a maintainable approach.  Was there a specific reason not to try to use
> ruleutils.c for this?  I'd much rather tweak ruleutils to expose some
> additional APIs, if that's what it takes, than have all this redundant
> logic.
>
The original pgsql_fdw design utilized ruleutils.c logic.
Previously, you suggested to implement its own logic for query deparsing,
then Hanada-san rewrite the relevant code. http://www.postgresql.org/message-id/12181.1331223482@sss.pgh.pa.us

Indeed, most of the logic is duplicated. However, it is to avoid bugs in
some corner cases, for instance, function name is not qualified with
schema even if this function is owned by different schema in remote side.
Do we add a flag on deparse_expression() to show this call intend to
construct remote executable query? It may be reasonable, but case-
branch makes code complicated in general....

Thanks,
-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Next
From: David Fetter
Date:
Subject: Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]