Skip to content
Snippets Groups Projects
  1. Mar 13, 2013
  2. Mar 10, 2013
    • Tom Lane's avatar
      Support writable foreign tables. · 21734d2f
      Tom Lane authored
      This patch adds the core-system infrastructure needed to support updates
      on foreign tables, and extends contrib/postgres_fdw to allow updates
      against remote Postgres servers.  There's still a great deal of room for
      improvement in optimization of remote updates, but at least there's basic
      functionality there now.
      
      KaiGai Kohei, reviewed by Alexander Korotkov and Laurenz Albe, and rather
      heavily revised by Tom Lane.
      21734d2f
  3. Dec 22, 2012
    • Tom Lane's avatar
      Fix documentation typo. · eb035068
      Tom Lane authored
      "GetForeignTableColumnOptions" should be "GetForeignColumnOptions".
      Noted by Metin Döşlü.
      eb035068
  4. Oct 10, 2012
  5. Jun 07, 2012
  6. Apr 06, 2012
    • Tom Lane's avatar
      Dept of second thoughts: improve the API for AnalyzeForeignTable. · cea49fe8
      Tom Lane authored
      If we make the initially-called function return the table physical-size
      estimate, acquire_inherited_sample_rows will be able to use that to
      allocate numbers of samples among child tables, when the day comes that
      we want to support foreign tables in inheritance trees.
      cea49fe8
    • Tom Lane's avatar
      Allow statistics to be collected for foreign tables. · 263d9de6
      Tom Lane authored
      ANALYZE now accepts foreign tables and allows the table's FDW to control
      how the sample rows are collected.  (But only manual ANALYZEs will touch
      foreign tables, for the moment, since among other things it's not very
      clear how to handle remote permissions checks in an auto-analyze.)
      
      contrib/file_fdw is extended to support this.
      
      Etsuro Fujita, reviewed by Shigeru Hanada, some further tweaking by me.
      263d9de6
  7. Mar 09, 2012
    • Tom Lane's avatar
      Revise FDW planning API, again. · b1495393
      Tom Lane authored
      Further reflection shows that a single callback isn't very workable if we
      desire to let FDWs generate multiple Paths, because that forces the FDW to
      do all work necessary to generate a valid Plan node for each Path.  Instead
      split the former PlanForeignScan API into three steps: GetForeignRelSize,
      GetForeignPaths, GetForeignPlan.  We had already bit the bullet of breaking
      the 9.1 FDW API for 9.2, so this shouldn't cause very much additional pain,
      and it's substantially more flexible for complex FDWs.
      
      Add an fdw_private field to RelOptInfo so that the new functions can save
      state there rather than possibly having to recalculate information two or
      three times.
      
      In addition, we'd not thought through what would be needed to allow an FDW
      to set up subexpressions of its choice for runtime execution.  We could
      treat ForeignScan.fdw_private as an executable expression but that seems
      likely to break existing FDWs unnecessarily (in particular, it would
      restrict the set of node types allowable in fdw_private to those supported
      by expression_tree_walker).  Instead, invent a separate field fdw_exprs
      which will receive the postprocessing appropriate for expression trees.
      (One field is enough since it can be a list of expressions; also, we assume
      the corresponding expression state tree(s) will be held within fdw_state,
      so we don't need to add anything to ForeignScanState.)
      
      Per review of Hanada Shigeru's pgsql_fdw patch.  We may need to tweak this
      further as we continue to work on that patch, but to me it feels a lot
      closer to being right now.
      b1495393
  8. Mar 08, 2012
    • Tom Lane's avatar
      Add GetForeignColumnOptions() to foreign.c, and add some documentation. · 9088d1b9
      Tom Lane authored
      GetForeignColumnOptions provides some abstraction for accessing
      column-specific FDW options, on a par with the access functions that were
      already provided here for other FDW-related information.
      
      Adjust file_fdw.c to use GetForeignColumnOptions instead of equivalent
      hand-rolled code.
      
      In addition, add some SGML documentation for the functions exported by
      foreign.c that are meant for use by FDW authors.
      
      (This is the fdw_helper portion of the proposed pgsql_fdw patch.)
      
      Hanada Shigeru, reviewed by KaiGai Kohei
      9088d1b9
  9. Mar 05, 2012
    • Tom Lane's avatar
      Redesign PlanForeignScan API to allow multiple paths for a foreign table. · 6b289942
      Tom Lane authored
      The original API specification only allowed an FDW to create a single
      access path, which doesn't seem like a terribly good idea in hindsight.
      Instead, move the responsibility for building the Path node and calling
      add_path() into the FDW's PlanForeignScan function.  Now, it can do that
      more than once if appropriate.  There is no longer any need for the
      transient FdwPlan struct, so get rid of that.
      
      Etsuro Fujita, Shigeru Hanada, Tom Lane
      6b289942
  10. Jul 25, 2011
  11. Jul 05, 2011
  12. Jun 13, 2011
  13. Feb 20, 2011
Loading