Re: Status of FDW pushdowns - Mailing list pgsql-hackers

From David Fetter
Subject Re: Status of FDW pushdowns
Date
Msg-id 20131122183710.GC21788@fetter.org
Whole thread Raw
In response to Re: Status of FDW pushdowns  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
On Fri, Nov 22, 2013 at 08:25:05AM -0600, Merlin Moncure wrote:
> On Thu, Nov 21, 2013 at 6:43 PM, Shigeru Hanada
> <shigeru.hanada@gmail.com> wrote:
> > 2013/11/22 Tom Lane <tgl@sss.pgh.pa.us>:
> >> Merlin Moncure <mmoncure@gmail.com> writes:
> >>> On Thu, Nov 21, 2013 at 9:05 AM, Bruce Momjian <bruce@momjian.us> wrote:
> >>>> I know join pushdowns seem insignificant, but it helps to restrict what
> >>>> data must be passed back because you would only pass back joined rows.
> >>
> >>> By 'insignificant' you mean 'necessary to do any non-trivial real
> >>> work'.   Personally, I'd prefer it if FDW was extended to allow
> >>> arbitrary parameterized queries like every other database connectivity
> >>> API ever made ever.
> >>
> >> [ shrug... ]  So use dblink.  For better or worse, the FDW stuff is
> >> following the SQL standard's SQL/MED design, which does not do it
> >> like that.
> >
> > Pass-through mode mentioned in SQL/MED standard might be what he wants.
> 
> happen to have a link handy?

http://www.wiscorp.com/sql20nn.zip

You'll want to look at the PDF with MED in its title.

Passthrough mode, which is how the standard "handles" this problem is
basically a thing where you set it to be on, then everything your send
until setting it to off is passed through to the remote side.  The
people writing the standard didn't think too much about the
possibility that the remote side might speak a broader or different
dialect of SQL from the local server.  They also didn't imagine cases
where what's being passed isn't SQL at all.

In addition to breaking any possible parser, the "feature" as
described in the standard is just ripe for un-patchable exploits *in
its design*.

Of all the misdesign-by-committee contained in the standard, this
piece is far and away the stupidest I've encountered to date.  We
should not even vaguely attempt to implement it.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



pgsql-hackers by date:

Previous
From: Rajeev rastogi
Date:
Subject: Re: COPY table FROM STDIN doesn't show count tag
Next
From: Alvaro Herrera
Date:
Subject: Re: MultiXact pessmization in 9.3