4 * Functions returning results from a remote database
6 * Joe Conway <mail@joeconway.com>
8 * Copyright (c) 2001, 2002 by PostgreSQL Global Development Group
11 * Permission to use, copy, modify, and distribute this software and its
12 * documentation for any purpose, without fee, and without a written agreement
13 * is hereby granted, provided that the above copyright notice and this
14 * paragraph and the following two paragraphs appear in all copies.
16 * IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
17 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
18 * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
19 * DOCUMENTATION, EVEN IF THE AUTHOR OR DISTRIBUTORS HAVE BEEN ADVISED OF THE
20 * POSSIBILITY OF SUCH DAMAGE.
22 * THE AUTHOR AND DISTRIBUTORS SPECIFICALLY DISCLAIMS ANY WARRANTIES,
23 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
25 * ON AN "AS IS" BASIS, AND THE AUTHOR AND DISTRIBUTORS HAS NO OBLIGATIONS TO
26 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
34 * This struct holds the results of the remote query.
35 * Use fn_extra to hold a pointer to it across calls
40 * last tuple number accessed
45 * resource index number for this context
50 * the actual query results
56 * External declarations
59 extern Datum dblink(PG_FUNCTION_ARGS);
60 extern Datum dblink_tok(PG_FUNCTION_ARGS);
63 extern Datum dblink_connect(PG_FUNCTION_ARGS);
64 extern Datum dblink_disconnect(PG_FUNCTION_ARGS);
65 extern Datum dblink_open(PG_FUNCTION_ARGS);
66 extern Datum dblink_close(PG_FUNCTION_ARGS);
67 extern Datum dblink_fetch(PG_FUNCTION_ARGS);
68 extern Datum dblink_record(PG_FUNCTION_ARGS);
69 extern Datum dblink_exec(PG_FUNCTION_ARGS);
70 extern Datum dblink_get_pkey(PG_FUNCTION_ARGS);
71 extern Datum dblink_last_oid(PG_FUNCTION_ARGS);
72 extern Datum dblink_build_sql_insert(PG_FUNCTION_ARGS);
73 extern Datum dblink_build_sql_delete(PG_FUNCTION_ARGS);
74 extern Datum dblink_build_sql_update(PG_FUNCTION_ARGS);
75 extern Datum dblink_current_query(PG_FUNCTION_ARGS);