diff options
| author | Bruce Momjian | 2002-09-02 06:13:31 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2002-09-02 06:13:31 +0000 |
| commit | 7b8eb0b4f1245f65e61ba30eea51bbbbfce9bdb9 (patch) | |
| tree | 6728c116a0969f34ccd5b1e8d2b6393d1d1415dc /contrib/dblink/dblink.h | |
| parent | a12b4e279bc12a7cd7b7d679fcac4689ac4aba7b (diff) | |
Attached is a fairly sizeable update to contrib/dblink. I'd love to get
review/feedback if anyone is interested and can spend the time. But I'd
also love to get this committed and address changes as incremental
patches ;-), so if there are no objections, please apply.
Below I'll give a synopsis of the changes. More detailed descriptions
are now in a new doc directory under contrib/dblink. There is also a new
dblink.test.sql file which will give a pretty good overview of the
functions and their use.
Joe Conway
Diffstat (limited to 'contrib/dblink/dblink.h')
| -rw-r--r-- | contrib/dblink/dblink.h | 72 |
1 files changed, 13 insertions, 59 deletions
diff --git a/contrib/dblink/dblink.h b/contrib/dblink/dblink.h index 4d53005ac60..ddca6241c4a 100644 --- a/contrib/dblink/dblink.h +++ b/contrib/dblink/dblink.h @@ -3,7 +3,9 @@ * * Functions returning results from a remote database * - * Copyright (c) Joseph Conway <mail@joeconway.com>, 2001, 2002, + * Joe Conway <mail@joeconway.com> + * + * Copyright (c) 2001, 2002 by PostgreSQL Global Development Group * ALL RIGHTS RESERVED; * * Permission to use, copy, modify, and distribute this software and its @@ -28,38 +30,6 @@ #ifndef DBLINK_H #define DBLINK_H -#include <string.h> -#include "postgres.h" -#include "libpq-fe.h" -#include "libpq-int.h" -#include "fmgr.h" -#include "access/tupdesc.h" -#include "access/heapam.h" -#include "catalog/catname.h" -#include "catalog/pg_index.h" -#include "catalog/pg_type.h" -#include "executor/executor.h" -#include "executor/spi.h" -#include "lib/stringinfo.h" -#include "nodes/nodes.h" -#include "nodes/execnodes.h" -#include "nodes/pg_list.h" -#include "parser/parse_type.h" -#include "tcop/tcopprot.h" -#include "utils/builtins.h" -#include "utils/fmgroids.h" -#include "utils/array.h" -#include "utils/syscache.h" - -#ifdef NamespaceRelationName -#include "catalog/namespace.h" -#endif /* NamespaceRelationName */ - -/* - * Max SQL statement size - */ -#define DBLINK_MAX_SQLSTATE_SIZE 16384 - /* * This struct holds the results of the remote query. * Use fn_extra to hold a pointer to it across calls @@ -82,43 +52,27 @@ typedef struct PGresult *res; } dblink_results; - -/* - * This struct holds results in the form of an array. - * Use fn_extra to hold a pointer to it across calls - */ -typedef struct -{ - /* - * elem being accessed - */ - int elem_num; - - /* - * number of elems - */ - int num_elems; - - /* - * the actual array - */ - void *res; - -} dblink_array_results; - /* * External declarations */ +/* deprecated */ extern Datum dblink(PG_FUNCTION_ARGS); extern Datum dblink_tok(PG_FUNCTION_ARGS); -extern Datum dblink_strtok(PG_FUNCTION_ARGS); + +/* supported */ +extern Datum dblink_connect(PG_FUNCTION_ARGS); +extern Datum dblink_disconnect(PG_FUNCTION_ARGS); +extern Datum dblink_open(PG_FUNCTION_ARGS); +extern Datum dblink_close(PG_FUNCTION_ARGS); +extern Datum dblink_fetch(PG_FUNCTION_ARGS); +extern Datum dblink_record(PG_FUNCTION_ARGS); +extern Datum dblink_exec(PG_FUNCTION_ARGS); extern Datum dblink_get_pkey(PG_FUNCTION_ARGS); extern Datum dblink_last_oid(PG_FUNCTION_ARGS); extern Datum dblink_build_sql_insert(PG_FUNCTION_ARGS); extern Datum dblink_build_sql_delete(PG_FUNCTION_ARGS); extern Datum dblink_build_sql_update(PG_FUNCTION_ARGS); extern Datum dblink_current_query(PG_FUNCTION_ARGS); -extern Datum dblink_replace_text(PG_FUNCTION_ARGS); extern char *debug_query_string; |
