Initial database functions

This commit is contained in:
Ian Barwick
2017-04-21 15:12:33 +09:00
parent 11b7dda778
commit 001d887e8d
9 changed files with 524 additions and 23 deletions

View File

@@ -7,6 +7,18 @@
#define _STRUTIL_H_
#define MAXLEN 1024
#define MAX_QUERY_LEN 8192
/* Why? http://stackoverflow.com/a/5459929/398670 */
#define STR(x) CppAsString(x)
#define MAXLEN_STR STR(MAXLEN)
extern int
sqlquery_snprintf(char *str, const char *format,...)
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
extern int
maxlen_snprintf(char *str, const char *format,...)
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
#endif