Rewrite dblink_record_internal() and dblink_fetch() to use a tuplestore

Joe Conway <mail@joeconway.com>

Commit: 56cbb611ec749ba867a4cfc09c8b7df0f4446620
Author: Joe Conway <mail@joeconway.com>
Date: 2010-01-24T22:19:38Z
Releases: 9.0.0
Rewrite dblink_record_internal() and dblink_fetch() to use a tuplestore
(SFRM_Materialize mode) to return tuples. Since we don't return from the
dblink function in tuplestore mode, release the PGresult with a PG_CATCH
block on error. Also rearrange to share the same code to materialize the
tuplestore. Patch by Takahiro Itagaki.

Files

PathChange+/−
contrib/dblink/dblink.c modified +232 −337