Re: Feature request: include script file into function body
В списке pgsql-bugs по дате отправления:
| От | Jasen Betts |
|---|---|
| Тема | Re: Feature request: include script file into function body |
| Дата | |
| Msg-id | iie5es$b91$2@reversiblemaps.ath.cx обсуждение исходный текст |
| Ответ на | Feature request: include script file into function body (Steve White <swhite@aip.de>) |
| Список | pgsql-bugs |
On 2011-02-02, Steve White <swhite@aip.de> wrote: > Hi, Robert, > > I made a file 'yadda_yadda.py' containing only the line: > print 'hello world' > >==================================================================== > d=# \set yadda `cat yadda_yadda.py` > d=# \echo :yadda > print 'hello world' >==================================================================== > But the :'yadda'; produces an error--it seems the variable yadda isn't > expanded in the presence of the quotes. yes, \set doesn't quote content \set yadda '''' `sed -e "s/'/''/g" -e 's/\\/\\\\/g' < yadda_yadda.py` '''' CREATE FUNCTION yadda_yadda() returns text language plpythonu AS E:yadda; this is not much help for windows users though. BTW I found that sed command on the psql man page. -- ââ 100% natural
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера