postgres.git / summary / log / commit / refs
commit b52fd1e7c76c21298d2e2ecc006c5a2d99b46da9
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Tue Mar 02 18:39:34 2021 +0000
First released in: 14.0, 10.17, 11.12, 12.7, 13.3
Use native path separators to pg_ctl in initdb
On Windows, CMD.EXE allegedly does not run a command that uses forward slashes,
so let's convert the path to use backslashes instead.
Backpatch to 10.
Author: Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Reviewed-by: Juan José SantamarÃa Flecha <juanjo.santamaria@gmail.com>
Discussion: https://postgr.es/m/CAMm1aWaNDuaPYFYMAqDeJrZmPtNvLcJRS++CcZWY8LT6KcoBZw@mail.gmail.com
src/bin/initdb/initdb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index eb75a72793a..291078a1756 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -3281,6 +3281,9 @@ main(int argc, char *argv[])
/* ... and tag on pg_ctl instead */
join_path_components(pg_ctl_path, pg_ctl_path, "pg_ctl");
+ /* Convert the path to use native separators */
+ make_native_path(pg_ctl_path);
+
/* path to pg_ctl, properly quoted */
appendShellString(start_db_cmd, pg_ctl_path);
[parent: 621e8a603d56]