]> granicus.if.org Git - postgresql/blob - contrib/dblink/dblink.h
Add DLLIMPORT declarations needed by contrib modules.
[postgresql] / contrib / dblink / dblink.h
1 /*
2  * dblink.h
3  *
4  * Functions returning results from a remote database
5  *
6  * Joe Conway <mail@joeconway.com>
7  *
8  * Copyright (c) 2001, 2002 by PostgreSQL Global Development Group
9  * ALL RIGHTS RESERVED;
10  *
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.
15  *
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.
21  *
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.
27  *
28  */
29
30 #ifndef DBLINK_H
31 #define DBLINK_H
32
33 /*
34  * This struct holds the results of the remote query.
35  * Use fn_extra to hold a pointer to it across calls
36  */
37 typedef struct
38 {
39         /*
40          * last tuple number accessed
41          */
42         int                     tup_num;
43
44         /*
45          * resource index number for this context
46          */
47         int                     res_id_index;
48
49         /*
50          * the actual query results
51          */
52         PGresult   *res;
53 }       dblink_results;
54
55 /*
56  * External declarations
57  */
58 /* deprecated */
59 extern Datum dblink(PG_FUNCTION_ARGS);
60 extern Datum dblink_tok(PG_FUNCTION_ARGS);
61
62 /* supported */
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);
76
77 #endif   /* DBLINK_H */