Skip to content

Instantly share code, notes, and snippets.

@adolgarev
adolgarev / clear.sql
Last active September 14, 2016 13:42
DROP SCHEMA public CASCADE;
CREATE SCHEMA public
AUTHORIZATION postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;
COMMENT ON SCHEMA public
IS 'standard public schema';
#define _XOPEN_SOURCE 600
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <inttypes.h>
#include <fcntl.h>
#include <errno.h>
#include <libaio.h>
#include <stddef.h>
#include <time.h>
#include <pthread.h>
#include "backup_app.h"
/* configuration, see config.c */
/* MySQL specific routines */
#ifndef EXTERN_MYSQL_H
#define EXTERN_MYSQL_H
#include <mysql/mysql.h>
extern char *DBHOST;
extern char *DBUSER;
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/wait.h>