PGROUTING  2.6-dev
postgres_connection.h
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 File: postgres_connection.h
3 
4 Copyright (c) 2015 Celia Virginia Vergara Castillo
5 vicky_vergara@hotmail.com
6 
7 ------
8 
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 
23 ********************************************************************PGR-GNU*/
24 #ifndef INCLUDE_C_COMMON_POSTGRES_CONNECTION_H_
25 #define INCLUDE_C_COMMON_POSTGRES_CONNECTION_H_
26 #pragma once
27 
28 
29 
30 #ifdef __GNUC__
31 #pragma GCC diagnostic ignored "-pedantic"
32 #endif
33 
34 #ifdef __clang__
35 #pragma clang diagnostic ignored "-pedantic"
36 #endif
37 
38 #ifdef __MSVC__
39 #pragma warning(disable : 4200)
40 #endif
41 
42 #include <postgres.h>
43 
44 
45 
46 #ifdef __GNUC__
47 #pragma GCC diagnostic ignored "-Wsign-conversion"
48 #pragma GCC diagnostic ignored "-Wunused-parameter"
49 #endif
50 
51 #ifdef __clang__
52 #pragma clang diagnostic ignored "-Wsign-conversion"
53 #pragma clang diagnostic ignored "-Wunused-parameter"
54 #endif
55 
56 #include <executor/spi.h>
57 #include <funcapi.h>
58 
59 #ifdef __GNUC__
60 #pragma GCC diagnostic pop
61 #pragma GCC diagnostic pop
62 #pragma GCC diagnostic pop
63 #endif
64 
65 #ifdef __clang__
66 #pragma clang diagnostic pop
67 #pragma clang diagnostic pop
68 #pragma clang diagnostic pop
69 #endif
70 
71 #include "utils/builtins.h" // for text_to_cstring
72 
73 #if PGSQL_VERSION > 92
74 #include "access/htup_details.h"
75 #endif
76 
77 #ifdef __clang__
78 #pragma clang diagnostic ignored "-Wunused-parameter"
79 #endif
80 
81 #ifdef __GNUC__
82 #pragma GCC diagnostic ignored "-Wunused-parameter"
83 #endif
84 
85 #include <fmgr.h>
86 
87 #ifdef __GNUC__
88 #pragma GCC diagnostic pop
89 #endif
90 
91 #ifdef __clang__
92 #pragma clang diagnostic pop
93 #endif
94 
95 
96 void pgr_send_error(int errcode);
97 void pgr_SPI_finish(void);
98 void pgr_SPI_connect(void);
99 SPIPlanPtr pgr_SPI_prepare(char* sql);
100 Portal pgr_SPI_cursor_open(SPIPlanPtr SPIplan);
101 char* pgr_cstring2char(const char *inStr);
102 
103 #endif // INCLUDE_C_COMMON_POSTGRES_CONNECTION_H_
Portal pgr_SPI_cursor_open(SPIPlanPtr SPIplan)
char * pgr_cstring2char(const char *inStr)
void pgr_SPI_connect(void)
void pgr_send_error(int errcode)
SPIPlanPtr pgr_SPI_prepare(char *sql)
void pgr_SPI_finish(void)