File: ogr_fdw_common.h

package info (click to toggle)
pgsql-ogr-fdw 1.1.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 696 kB
  • sloc: ansic: 4,114; makefile: 62; sql: 36; sh: 15
file content (33 lines) | stat: -rw-r--r-- 977 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*-------------------------------------------------------------------------
 *
 * ogr_fdw_common.h
 *		  foreign-data wrapper for GIS data access.
 *
 * Copyright (c) 2014-2015, Paul Ramsey <pramsey@cleverelephant.ca>
 *
 *-------------------------------------------------------------------------
 */

#ifndef _OGR_FDW_COMMON_H
#define _OGR_FDW_COMMON_H 1

#include <string.h>
#include <ctype.h>
#include "stringbuffer.h"

#define STR_MAX_LEN 256

/* Utility macros for string equality */
#define streq(s1,s2) (strcmp((s1),(s2)) == 0)
#define strcaseeq(s1,s2) (strcasecmp((s1),(s2)) == 0)


/* Re-write a string in place with laundering rules */
void ogrStringLaunder(char *str);

OGRErr ogrLayerToSQL (const OGRLayerH ogr_lyr, const char *fwd_server,
                      int launder_table_names, int launder_column_names,
                      const char *fdw_table_name,
                      int use_postgis_geometry, stringbuffer_t *buf);

#endif /* _OGR_FDW_COMMON_H */