1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Move a couple of initdb's subroutines into src/port/.

mkdir_p and check_data_dir will be useful in CREATE TABLESPACE, since we
have agreed that that command should handle subdirectory creation just like
initdb creates the PGDATA directory.  Push them into src/port/ so that they
are available to both initdb and the backend.  Rename to pg_mkdir_p and
pg_check_dir, just to be on the safe side.  Add FreeBSD's copyright notice
to pgmkdirp.c, since that's where the code came from originally (this
really should have been in initdb.c).  Very marginal code/comment cleanup.
This commit is contained in:
Tom Lane
2010-12-10 19:42:44 -05:00
parent 04f4e10cfc
commit 671199929d
5 changed files with 240 additions and 169 deletions

View File

@@ -441,4 +441,10 @@ extern int pg_get_encoding_from_locale(const char *ctype);
extern char *inet_net_ntop(int af, const void *src, int bits,
char *dst, size_t size);
/* port/pgcheckdir.c */
extern int pg_check_dir(const char *dir);
/* port/pgmkdirp.c */
extern int pg_mkdir_p(char *path, int omode);
#endif /* PG_PORT_H */