PGROUTING  2.5
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 #ifdef __GNUC__
30 #if __GNUC__ > 5
31 #pragma GCC diagnostic ignored "-Wpedantic"
32 #else
33 #pragma GCC diagnostic ignored "-pedantic"
34 #endif
35 #endif
36 
37 #ifdef __clang__
38 #pragma clang diagnostic push
39 #pragma clang diagnostic ignored "-pedantic"
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 push
53 #pragma clang diagnostic ignored "-Wsign-conversion"
54 #pragma clang diagnostic push
55 #pragma clang diagnostic ignored "-Wunused-parameter"
56 #endif
57 
58 #include "executor/spi.h"
59 
60 
61 #include "utils/builtins.h" // for text_to_cstring
62 
63 #if PGSQL_VERSION > 92
64 #include "access/htup_details.h"
65 #endif
66 
67 #ifdef __clang__
68 #pragma clang diagnostic push
69 #pragma clang diagnostic ignored "-Wunused-parameter"
70 #endif
71 
72 #ifdef __GNUC__
73 #pragma GCC diagnostic ignored "-Wunused-parameter"
74 #endif
75 
76 #include <funcapi.h>
77 #include <fmgr.h>
78 
79 #ifdef __GNUC__
80 #pragma GCC diagnostic pop
81 #pragma GCC diagnostic pop
82 #pragma GCC diagnostic pop
83 #pragma GCC diagnostic pop
84 #endif
85 
86 #ifdef __clang__
87 #pragma clang diagnostic pop
88 #pragma clang diagnostic pop
89 #pragma clang diagnostic pop
90 #pragma clang diagnostic pop
91 #endif
92 
93 
94 void pgr_send_error(int errcode);
95 void pgr_SPI_finish(void);
96 void pgr_SPI_connect(void);
97 SPIPlanPtr pgr_SPI_prepare(char* sql);
98 Portal pgr_SPI_cursor_open(SPIPlanPtr SPIplan);
99 char* pgr_cstring2char(const char *inStr);
100 
101 #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)