Using file data as argument to functions called from psql command line - Mailing list pgsql-novice

From Mazen Abdel-Rahman
Subject Using file data as argument to functions called from psql command line
Date
Msg-id 92265adf0911182014u1b909f9clded13efe547f7e7e@mail.gmail.com
Whole thread Raw
Responses Re: Using file data as argument to functions called from psql command line  (Thom Brown <thombrown@gmail.com>)
List 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 by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Padding time values from EXTRACT()
Next
From: Thom Brown
Date:
Subject: Re: Using file data as argument to functions called from psql command line