-
-
Save vadv/37cb2147255577856a75b27a95ad1ee0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <string.h> | |
int main (void) | |
{ | |
char fn[100]; | |
int f; | |
char basedir[] = "f:\\data\\"; | |
char current_walfile_name[] = "pg_xlog/fooo"; | |
snprintf(fn, sizeof(fn), "%s/%s", basedir, current_walfile_name); | |
printf("fn: %s\n", fn); | |
f = open(fn, O_WRONLY); | |
if (f == -1) { | |
fprintf(stderr,("could not open transaction log file \"%s\": %s\n"), fn, strerror(errno)); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment