Re: How do I 'include' a stored procedure in a SQL script file
В списке pgsql-general по дате отправления:
| От | Adrian Klaver |
|---|---|
| Тема | Re: How do I 'include' a stored procedure in a SQL script file |
| Дата | |
| Msg-id | 200901120619.59756.aklaver@comcast.net обсуждение исходный текст |
| Ответ на | Re: How do I 'include' a stored procedure in a SQL script file (DonnaR <donna@therudds.co.uk>) |
| Список | pgsql-general |
On Monday 12 January 2009 3:14:56 am DonnaR wrote: > Currently I'm using PGAdmin to create everything, but I need to create a > script file to create the schemas and the tables to ultimately run outside > of PGAdmin. Since I have triggers, I need to 'load in' the (long) > stored/triggered procedures during this process (ie 'call or 'include' > another file with the stored procedure in it). It's this 'call' that I > can't get to work. The \i <other_file> doesn't work (syntax error) within > this main file. I just want to tell it to go and read in this other file. > Note: I'm assuming the same file should run wthin PGAdmin and then outside > it. > Have you tried: psql -d some_db -U some_user -f trigger_func.sql \i only works inside of psql. -- Adrian Klaver aklaver@comcast.net
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера