PGROUTING  2.6
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 push
36 #pragma clang diagnostic ignored "-pedantic"
37 #endif
38 
39 #ifdef __MSVC__
40 #pragma warning(disable : 4200)
41 #endif
42 
43 #include <postgres.h>
44 
45 
46 
47 #ifdef __GNUC__
48 #pragma GCC diagnostic ignored "-Wsign-conversion"
49 #pragma GCC diagnostic ignored "-Wunused-parameter"
50 #endif
51 
52 #ifdef __clang__
53 #pragma clang diagnostic push
54 #pragma clang diagnostic ignored "-Wsign-conversion"
55 #pragma clang diagnostic push
56 #pragma clang diagnostic ignored "-Wunused-parameter"
57 #endif
58 
59 #include <executor/spi.h>
60 #include <funcapi.h>
61 
62 #ifdef __GNUC__
63 #pragma GCC diagnostic pop
64 #pragma GCC diagnostic pop
65 #pragma GCC diagnostic pop
66 #endif
67 
68 #ifdef __clang__
69 #pragma clang diagnostic pop
70 #pragma clang diagnostic pop
71 #pragma clang diagnostic pop
72 #endif
73 
74 #include "utils/builtins.h" // for text_to_cstring
75 
76 #if PGSQL_VERSION > 92
77 #include "access/htup_details.h"
78 #endif
79 
80 #ifdef __clang__
81 #pragma clang diagnostic push
82 #pragma clang diagnostic ignored "-Wunused-parameter"
83 #endif
84 
85 #ifdef __GNUC__
86 #pragma GCC diagnostic ignored "-Wunused-parameter"
87 #endif
88 
89 #include <fmgr.h>
90 
91 #ifdef __GNUC__
92 #pragma GCC diagnostic pop
93 #endif
94 
95 #ifdef __clang__
96 #pragma clang diagnostic pop
97 #endif
98 
99 
100 void pgr_send_error(int errcode);
101 void pgr_SPI_finish(void);
102 void pgr_SPI_connect(void);
103 SPIPlanPtr pgr_SPI_prepare(char* sql);
104 Portal pgr_SPI_cursor_open(SPIPlanPtr SPIplan);
105 char* pgr_cstring2char(const char *inStr);
106 
107 #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)