| От | Peter Eisentraut |
|---|---|
| Тема | Re: Loading a list of SQL scripts with relative paths |
| Дата | |
| Msg-id | 200505101829.58576.peter_e@gmx.net обсуждение |
| Ответ на | Loading a list of SQL scripts with relative paths (Michael Glaesemann <grzm@myrealbox.com>) |
| Список | pgsql-general |
Michael Glaesemann wrote: > This works well, but I think I'll have to change all of the paths > when I move the group of scripts to the production server to load > them. What I'd like to do is be able to use paths relative to the > file that contains the \i commands. This doesn't seem to work when > using \i. The paths are, as you probably found out, relative to the current working directory. Since the path of the current script is not exposed as a variable or something like that in psql, I don't think you can do any computations within psql to achieve what you want. Others may have ideas how you can organize your scripts differently, though. -- Peter Eisentraut http://developer.postgresql.org/~petere/
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера