48 if (tablespaceOid == DEFAULTTABLESPACE_OID ||
49 tablespaceOid == GLOBALTABLESPACE_OID)
64 if (
lstat(sourcepath, &st) < 0)
67 errmsg(
"could not stat file \"%s\": %m",
76 rllen =
readlink(sourcepath, targetpath,
sizeof(targetpath));
80 errmsg(
"could not read symbolic link \"%s\": %m",
82 if (rllen >=
sizeof(targetpath))
84 errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
85 errmsg(
"symbolic link \"%s\" target is too long",
87 targetpath[rllen] =
'\0';
int errcode_for_file_access(void)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
char * pstrdup(const char *in)
char * get_tablespace_location(Oid tablespaceOid)
#define readlink(path, buf, size)