Using file data as argument to functions called from psql command line

Поиск
Список
Период
Сортировка
От Mazen Abdel-Rahman
Тема Using file data as argument to functions called from psql command line
Дата
Msg-id 92265adf0911182014u1b909f9clded13efe547f7e7e@mail.gmail.com
обсуждение исходный текст
Ответы Re: Using file data as argument to functions called from psql command line  (Thom Brown <thombrown@gmail.com>)
Список pgsql-novice
Hi All,

Is it possible possible to use a file's data as an argument to one of PostgreSQL's functions via the psql command line?

For example - I know I can do this:

select xpath('/bookstore/book','<?xml version="1.0" encoding="ISO-8859-1"?><bookstore><book><title lang="eng">Harry Potter</title><price>29.99</price></book></bookstore>')


Is it possible to read a file to be the second argument in this function? (For example books.xml).

Thank You!
Mazen Abdel-Rahman

В списке pgsql-novice по дате отправления:

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: Padding time values from EXTRACT()
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Using file data as argument to functions called from psql command line